oracle19c 集群模式下删除节点

待删除节点db3n2

1.确定待删除节点是否处于pinned状态

[[email protected] ~]$ olsnodes -s -t

db3n1   Active  Unpinned

db3n2   Active  Unpinned

否则通过如下命令解除pinned状态

crsctl unpin css -n db3n2

2.停db3n2上数据库实例和删除db资源

[[email protected] deinstall]$ srvctl stop instance -i orcldb2 -db orcldb

[[email protected] ~]$ srvctl remove instance -i orcldb2 -db orcldb

3.执行deinstall

[[email protected] deinstall]$ $ORACLE_HOME/deinstall/deinstall -local

Checking for required files and bootstrapping ...

Please wait ...

Location of logs /tmp/deinstall2020-03-12_01-42-55PM/logs/

 

############ ORACLE DECONFIG TOOL START ############

 

 

######################### DECONFIG CHECK OPERATION START #########################

## [START] Install check configuration ##

 

 

Checking for existence of the Oracle home location /u01/app/19c/19.3.0/grid

Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Cluster

Oracle Base selected for deinstall is: /u01/app/19c/grid

Checking for existence of central inventory location /u01/app/19c/grid/oraInventory

Checking for existence of the Oracle Grid Infrastructure home /u01/app/19c/19.3.0/grid

The following nodes are part of this cluster: db3n2,db3n1

Checking for sufficient temp space availability on node(s) : 'db3n2'

 

## [END] Install check configuration ##

 

Traces log file: /tmp/deinstall2020-03-12_01-42-55PM/logs//crsdc_2020-03-12_01-43-09-PM.log

 

Network Configuration check config START

 

Network de-configuration trace file location: /tmp/deinstall2020-03-12_01-42-55PM/logs/netdc_check2020-03-12_01-43-10PM.log

 

Network Configuration check config END

 

Asm Check Configuration START

 

 

Network Configuration clean config START

 

Network de-configuration trace file location: /tmp/deinstall2020-03-12_01-42-55PM/logs/netdc_clean2020-03-12_01-43-10PM.log

 

Network Configuration clean config END

 

 

Run the following command as the root user or the administrator on node "db3n2".

 

/u01/app/19c/19.3.0/grid/crs/install/rootcrs.sh -force  -deconfig -paramfile "/tmp/deinstall2020-03-12_01-42-55PM/response/deinstall_OraGI19Home1.rsp"

 

Press Enter after you finish running the above commands

 

<----------------------------------------

[[email protected] deinstall]$ $ORACLE_HOME/deinstall/deinstall -local

Checking for required files and bootstrapping ...

Please wait ...

Location of logs /tmp/deinstall2020-03-12_01-42-55PM/logs/

 

############ ORACLE DECONFIG TOOL START ############

 

 

######################### DECONFIG CHECK OPERATION START #########################

## [START] Install check configuration ##

 

 

Checking for existence of the Oracle home location /u01/app/19c/19.3.0/grid

Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Cluster

Oracle Base selected for deinstall is: /u01/app/19c/grid

Checking for existence of central inventory location /u01/app/19c/grid/oraInventory

Checking for existence of the Oracle Grid Infrastructure home /u01/app/19c/19.3.0/grid

The following nodes are part of this cluster: db3n2,db3n1

Checking for sufficient temp space availability on node(s) : 'db3n2'

 

## [END] Install check configuration ##

 

Traces log file: /tmp/deinstall2020-03-12_01-42-55PM/logs//crsdc_2020-03-12_01-43-09-PM.log

 

Network Configuration check config START

 

Network de-configuration trace file location: /tmp/deinstall2020-03-12_01-42-55PM/logs/netdc_check2020-03-12_01-43-10PM.log

 

Network Configuration check config END

 

Asm Check Configuration START

 

 

Network Configuration clean config START

 

Network de-configuration trace file location: /tmp/deinstall2020-03-12_01-42-55PM/logs/netdc_clean2020-03-12_01-43-10PM.log

 

Network Configuration clean config END

 

 

Run the following command as the root user or the administrator on node "db3n2".

 

/u01/app/19c/19.3.0/grid/crs/install/rootcrs.sh -force  -deconfig -paramfile "/tmp/deinstall2020-03-12_01-42-55PM/response/deinstall_OraGI19Home1.rsp"

 

Press Enter after you finish running the above commands

 

<----------------------------------------

另一窗口root执行提示标红加粗命令行,成功后再输入enter继续

[[email protected] ~]# /u01/app/19c/19.3.0/grid/crs/install/rootcrs.sh -force  -deconfig -paramfile "/tmp/deinstall2020-03-12_01-42-55PM/response/deinstall_OraGI19Home1.rsp"

Using configuration parameter file: /tmp/deinstall2020-03-12_01-42-55PM/response/deinstall_OraGI19Home1.rsp

The log of current session can be found at:

  /tmp/deinstall2020-03-12_01-42-55PM/logs/crsdeconfig_db3n2_2020-03-12_01-45-34PM.log

2020/03/12 13:47:28 CLSRSC-4006: Removing Oracle Trace File Analyzer (TFA) Collector.

2020/03/12 13:49:31 CLSRSC-4007: Successfully removed Oracle Trace File Analyzer (TFA) Collector.

2020/03/12 13:49:42 CLSRSC-336: Successfully deconfigured Oracle Clusterware stack on this node

接deinstall输出

######################### DECONFIG CLEAN OPERATION END #########################

 

 

####################### DECONFIG CLEAN OPERATION SUMMARY #######################

There is no Oracle Grid Management database to de-configure in this Grid Infrastructure home

Oracle Clusterware is stopped and successfully de-configured on node "db3n2"

Oracle Clusterware is stopped and de-configured successfully.

#######################################################################

 

 

############# ORACLE DECONFIG TOOL END #############

 

Using properties file /tmp/deinstall2020-03-12_01-42-55PM/response/deinstall_2020-03-12_01-43-06-PM.rsp

Location of logs /tmp/deinstall2020-03-12_01-42-55PM/logs/

 

############ ORACLE DEINSTALL TOOL START ############

 

 

 

 

 

####################### DEINSTALL CHECK OPERATION SUMMARY #######################

A log of this session will be written to: '/tmp/deinstall2020-03-12_01-42-55PM/logs/deinstall_deconfig2020-03-12_01-43-06-PM.out'

Any error messages from this session will be written to: '/tmp/deinstall2020-03-12_01-42-55PM/logs/deinstall_deconfig2020-03-12_01-43-06-PM.err'

 

######################## DEINSTALL CLEAN OPERATION START ########################

## [START] Preparing for Deinstall ##

Setting LOCAL_NODE to db3n2

Setting CLUSTER_NODES to db3n2

Setting CRS_HOME to true

Setting oracle.installer.invPtrLoc to /tmp/deinstall2020-03-12_01-42-55PM/oraInst.loc

Setting oracle.installer.local to true

 

## [END] Preparing for Deinstall ##

 

Setting the force flag to false

Setting the force flag to cleanup the Oracle Base

Oracle Universal Installer clean START

 

Detach Oracle home '/u01/app/19c/19.3.0/grid' from the central inventory on the local node : Done

 

Failed to delete the directory '/u01/app/19c/19.3.0/grid'. Either user has no permission to delete or it is in use.

Delete directory '/u01/app/19c/19.3.0/grid' on the local node : Failed <<<<

 

Delete directory '/u01/app/19c/grid/oraInventory' on the local node : Done

 

Failed to delete the directory '/u01/app/19c/grid'. Either user has no permission to delete or it is in use.

Delete directory '/u01/app/19c/grid' on the local node : Failed <<<<

 

Oracle Universal Installer cleanup completed with errors.

 

Oracle Universal Installer clean END

 

 

## [START] Oracle install clean ##

 

 

## [END] Oracle install clean ##

 

 

######################### DEINSTALL CLEAN OPERATION END #########################

 

 

####################### DEINSTALL CLEAN OPERATION SUMMARY #######################

Successfully detached Oracle home '/u01/app/19c/19.3.0/grid' from the central inventory on the local node.

Failed to delete directory '/u01/app/19c/19.3.0/grid' on the local node due to error : Either user has no permission to delete or file is in use.

Review the permissions and manually delete '/u01/app/19c/19.3.0/grid' on local node.

Successfully deleted directory '/u01/app/19c/grid/oraInventory' on the local node.

Failed to delete directory '/u01/app/19c/grid' on the local node due to error : Either user has no permission to delete or file is in use.

Review the permissions and manually delete '/u01/app/19c/grid' on local node.

Oracle Universal Installer cleanup completed with errors.

 

 

Run 'rm -r /etc/oraInst.loc' as root on node(s) 'db3n2' at the end of the session.

 

Run 'rm -r /opt/ORCLfmap' as root on node(s) 'db3n2' at the end of the session.

Review the permissions and contents of '/u01/app/19c/grid' on nodes(s) 'db3n2'.

If there are no Oracle home(s) associated with '/u01/app/19c/grid', manually delete '/u01/app/19c/grid' and its contents.

Oracle deinstall tool successfully cleaned up temporary directories.

#######################################################################

 

 

############# ORACLE DEINSTALL TOOL END #############

4.节点db3n1执行delete node

[[email protected] ~]# /u01/app/19c/19.3.0/grid/bin/crsctl delete node -n db3n2

CRS-4661: Node db3n2 successfully deleted.

5.验证节点db3n2是否成功删除

[[email protected] ~]$ cluvfy stage -post nodedel -n db3n2 -verbose

 

Verifying Node Removal ...

  Verifying CRS Integrity ...PASSED

  Verifying Clusterware Version Consistency ...PASSED

Verifying Node Removal ...PASSED

 

Post-check for node removal was successful.

 

CVU operation performed:      stage -post nodedel

Date:                         Mar 12, 2020 1:53:42 PM

CVU home:                     /u01/app/19c/19.3.0/grid/

User:                         grid

6.检查db3n2上vip资源是否存在,如仍存在则删除

$ srvctl stop vip -node db3n2

$ srvctl remove vip -vip ora.db3n2.vip 

7.确定当前集群状态

oracle19c 集群模式下删除节点