In this post, we will delete a node to our existing Oracle Clusterware.

This is required for multiple reasons as per needs

Please click on the INDEX and browse for more interesting posts.

Existing node : Jack, Jill
Node to be Deleted : Jill

NOTE : Due to resource crunch, we could delete a node from a 2 node RAC system. The steps are however same for any number of nodes.

Steps :

Check the status of nodes (pinned/Unpinned)

[oracle@jack bin]$ cd $GRID_HOME/bin
[oracle@jack bin]$ ./olsnodes -s -t -n
jack	1	Active	Unpinned
jill	2	Active	Unpinned

 

If the node is pinned, then run the crsctl unpin css to unpinned the nodes from GRID_HOME.

Delete instance from node 2 :

[oracle@jack bin]$ $ORACLE_HOME/bin/dbca -silent -deleteInstance -nodeList jill -gdbName infra -instanceName infra2 -sysDBAUserName sys -sysDBAPassword oracle
[WARNING] [DBT-19203] The Database Configuration Assistant will delete the Oracle instance and its associated OFA directory structure. All information about this instance will be deleted.

Prepare for db operation
40% complete
Deleting instance
48% complete
52% complete
56% complete
60% complete
64% complete
68% complete
72% complete
76% complete
80% complete
Completing instance management.
100% complete
Instance "infra2" deleted successfully from node "jill".
Look at the log file "/u01/app/oracle/orabase/cfgtoollogs/dbca/infra/infra.log" for further details.

 

Check the status by issuing the below command :

[oracle@jack bin]$ srvctl config database -d infra
Database unique name: infra
Database name: infra
Oracle home: /u01/app/oracle/product/19c/db_1
Oracle user: oracle
Spfile: +DATA/infra/PARAMETERFILE/spfile.274.1079014371
Password file: +DATA/infra/PASSWORD/pwdinfra.262.1079013137
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: 
Disk Groups: FRA,DATA
Mount point paths: 
Services: 
Type: RAC
Start concurrency: 
Stop concurrency: 
OSDBA group: oinstall
OSOPER group: oinstall
Database instances: infra1
Configured nodes: jack
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services: 
Database is administrator managed

[oracle@jack bin]$ srvctl status database -d infra -v
Instance infra1 is running on node jack. Instance status: Open.

 

Deinstall the Oracle Home :

[oracle@jill deinstall]$ cd $ORACLE_HOME/deinstall
[oracle@jill deinstall]$ ./deinstall -local
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /u01/app/19c/oraInventory/logs/

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


######################### DECONFIG CHECK OPERATION START #########################
## [START] Install check configuration ##


Checking for existence of the Oracle home location /u01/app/oracle/product/19c/db_1
Oracle Home type selected for deinstall is: Oracle Real Application Cluster Database
Oracle Base selected for deinstall is: /u01/app/oracle/orabase
Checking for existence of central inventory location /u01/app/19c/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /u01/app/19c/grid
The following nodes are part of this cluster: jill,jack
Checking for sufficient temp space availability on node(s) : 'jill'

## [END] Install check configuration ##


Network Configuration check config START

Network de-configuration trace file location: /u01/app/19c/oraInventory/logs/netdc_check2021-07-27_05-49-52PM.log

Network Configuration check config END

Database Check Configuration START

Database de-configuration trace file location: /u01/app/19c/oraInventory/logs/databasedc_check2021-07-27_05-49-52PM.log

Use comma as separator when specifying list of values as input

Specify the list of database names that are configured locally on this node for this Oracle home. Local configurations of the discovered databases will be removed []: 
Database Check Configuration END

######################### DECONFIG CHECK OPERATION END #########################


####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /u01/app/19c/grid
The following nodes are part of this cluster: jill,jack
The cluster node(s) on which the Oracle home deinstallation will be performed are:jill
Oracle Home selected for deinstall is: /u01/app/oracle/product/19c/db_1
Inventory Location where the Oracle home registered is: /u01/app/19c/oraInventory
Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/u01/app/19c/oraInventory/logs/deinstall_deconfig2021-07-27_05-49-26-PM.out'
Any error messages from this session will be written to: '/u01/app/19c/oraInventory/logs/deinstall_deconfig2021-07-27_05-49-26-PM.err'

######################## DECONFIG CLEAN OPERATION START ########################
Database de-configuration trace file location: /u01/app/19c/oraInventory/logs/databasedc_clean2021-07-27_05-49-52PM.log

Network Configuration clean config START

Network de-configuration trace file location: /u01/app/19c/oraInventory/logs/netdc_clean2021-07-27_05-49-52PM.log

Network Configuration clean config END


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


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


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

Using properties file /tmp/deinstall2021-07-27_05-49-00PM/response/deinstall_2021-07-27_05-49-26-PM.rsp
Location of logs /u01/app/19c/oraInventory/logs/

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





####################### DEINSTALL CHECK OPERATION SUMMARY #######################
A log of this session will be written to: '/u01/app/19c/oraInventory/logs/deinstall_deconfig2021-07-27_05-49-26-PM.out'
Any error messages from this session will be written to: '/u01/app/19c/oraInventory/logs/deinstall_deconfig2021-07-27_05-49-26-PM.err'

######################## DEINSTALL CLEAN OPERATION START ########################
## [START] Preparing for Deinstall ##
Setting LOCAL_NODE to jill
Setting CLUSTER_NODES to jill
Setting CRS_HOME to false
Setting oracle.installer.invPtrLoc to /tmp/deinstall2021-07-27_05-49-00PM/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/oracle/product/19c/db_1' from the central inventory on the local node : Done

Delete directory '/u01/app/oracle/product/19c/db_1' on the local node : Done

The Oracle Base directory '/u01/app/oracle/orabase' will not be removed on local node. The directory is not empty. User needs to manually cleanup this directory.

Oracle Universal Installer cleanup was successful.

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/oracle/product/19c/db_1' from the central inventory on the local node.
Successfully deleted directory '/u01/app/oracle/product/19c/db_1' on the local node.
Oracle Universal Installer cleanup was successful.

Review the permissions and contents of '/u01/app/oracle/orabase' on nodes(s) 'jill'.
If there are no Oracle home(s) associated with '/u01/app/oracle/orabase', manually delete '/u01/app/oracle/orabase' and its contents.
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################


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



[oracle@jill deinstall]$ rm -rf /u01/app/oracle/orabase --> Delete the files as mentioned in the above output

 

GRID Deinstall :

Login as grid user and fire the below command from the node which needs to be deleted

[oracle@jill deinstall]$ /u01/app/19c/grid/deinstall/deinstall -local
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
pwd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
pwd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /tmp/deinstall2021-07-27_05-55-32PM/logs/

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


######################### DECONFIG CHECK OPERATION START #########################
## [START] Install check configuration ##


Checking for existence of the Oracle home location /u01/app/19c/grid
Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Cluster
Oracle Base selected for deinstall is: /u01/app/19c/gridbase
Checking for existence of central inventory location /u01/app/19c/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /u01/app/19c/grid
The following nodes are part of this cluster: jill,jack
Checking for sufficient temp space availability on node(s) : 'jill'

## [END] Install check configuration ##

Traces log file: /tmp/deinstall2021-07-27_05-55-32PM/logs//crsdc_2021-07-27_05-55-56-PM.log

Network Configuration check config START

Network de-configuration trace file location: /tmp/deinstall2021-07-27_05-55-32PM/logs/netdc_check2021-07-27_05-56-00PM.log

Network Configuration check config END

Asm Check Configuration START

ASM de-configuration trace file location: /tmp/deinstall2021-07-27_05-55-32PM/logs/asmcadc_check2021-07-27_05-56-00PM.log

Database Check Configuration START

Database de-configuration trace file location: /tmp/deinstall2021-07-27_05-55-32PM/logs/databasedc_check2021-07-27_05-56-00PM.log

Oracle Grid Management database was not found in this Grid Infrastructure home

Database Check Configuration END

######################### DECONFIG CHECK OPERATION END #########################


####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /u01/app/19c/grid
The following nodes are part of this cluster: jill,jack
The cluster node(s) on which the Oracle home deinstallation will be performed are:jill
Oracle Home selected for deinstall is: /u01/app/19c/grid
Inventory Location where the Oracle home registered is: /u01/app/19c/oraInventory
Option -local will not modify any ASM configuration.
Oracle Grid Management database was not found in this Grid Infrastructure home
Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/tmp/deinstall2021-07-27_05-55-32PM/logs/deinstall_deconfig2021-07-27_05-55-51-PM.out'
Any error messages from this session will be written to: '/tmp/deinstall2021-07-27_05-55-32PM/logs/deinstall_deconfig2021-07-27_05-55-51-PM.err'

######################## DECONFIG CLEAN OPERATION START ########################
Database de-configuration trace file location: /tmp/deinstall2021-07-27_05-55-32PM/logs/databasedc_clean2021-07-27_05-56-00PM.log
ASM de-configuration trace file location: /tmp/deinstall2021-07-27_05-55-32PM/logs/asmcadc_clean2021-07-27_05-56-00PM.log
ASM Clean Configuration END

Network Configuration clean config START

Network de-configuration trace file location: /tmp/deinstall2021-07-27_05-55-32PM/logs/netdc_clean2021-07-27_05-56-00PM.log

Network Configuration clean config END


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

/u01/app/19c/grid/crs/install/rootcrs.sh -force  -deconfig -paramfile "/tmp/deinstall2021-07-27_05-55-32PM/response/deinstall_OraGI19Home1.rsp"

Press Enter after you finish running the above commands

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

 

Go to another terminal and execute the root script :

[root@jill ~]# /u01/app/19c/grid/crs/install/rootcrs.sh -force  -deconfig -paramfile "/tmp/deinstall2021-07-27_05-55-32PM/response/deinstall_OraGI19Home1.rsp"
Using configuration parameter file: /tmp/deinstall2021-07-27_05-55-32PM/response/deinstall_OraGI19Home1.rsp
The log of current session can be found at:
  /tmp/deinstall2021-07-27_05-55-32PM/logs/crsdeconfig_jill_2021-07-27_05-57-04PM.log
2021/07/27 17:59:06 CLSRSC-4006: Removing Oracle Trace File Analyzer (TFA) Collector.
2021/07/27 18:01:14 CLSRSC-4007: Successfully removed Oracle Trace File Analyzer (TFA) Collector.
2021/07/27 18:01:18 CLSRSC-336: Successfully deconfigured Oracle Clusterware stack on this node

 

Once this is done, press ENTER in the first terminal :

Press Enter after you finish running the above commands

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


######################### 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 "jill"
Oracle Clusterware is stopped and de-configured successfully.
#######################################################################


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

Using properties file /tmp/deinstall2021-07-27_05-55-32PM/response/deinstall_2021-07-27_05-55-51-PM.rsp
Location of logs /tmp/deinstall2021-07-27_05-55-32PM/logs/

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





####################### DEINSTALL CHECK OPERATION SUMMARY #######################
A log of this session will be written to: '/tmp/deinstall2021-07-27_05-55-32PM/logs/deinstall_deconfig2021-07-27_05-55-51-PM.out'
Any error messages from this session will be written to: '/tmp/deinstall2021-07-27_05-55-32PM/logs/deinstall_deconfig2021-07-27_05-55-51-PM.err'

######################## DEINSTALL CLEAN OPERATION START ########################
## [START] Preparing for Deinstall ##
Setting LOCAL_NODE to jill
Setting CLUSTER_NODES to jill
Setting CRS_HOME to true
Setting oracle.installer.invPtrLoc to /tmp/deinstall2021-07-27_05-55-32PM/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/grid' from the central inventory on the local node : Done

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

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

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

Oracle Universal Installer cleanup was successful.

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/grid' from the central inventory on the local node.
Successfully deleted directory '/u01/app/19c/grid' on the local node.
Successfully deleted directory '/u01/app/19c/oraInventory' on the local node.
Successfully deleted directory '/u01/app/19c/gridbase' on the local node.
Oracle Universal Installer cleanup was successful.


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

Run 'rm -r /opt/ORCLfmap' as root on node(s) 'jill' at the end of the session.
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################


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

 

Run the below commands from Root user as mentioned :

[root@jill ~]# rm -rf /etc/oraInst.loc
[root@jill ~]# rm -rf /opt/ORCLfmap

 

Go to Node 1 :

From Node 1 delete the entries of Jill (Node to be deleted)

[root@jack ~]# cd /u01/app/19c/grid/bin
[root@jack bin]# ./crsctl delete node -n jill
CRS-4661: Node jill successfully deleted.

 

Run the below commands to update the Oracle Inventory for GI and RDBMS homes across all nodes :

[oracle@jack bin]$ cd $GRID_HOME/oui/bin
[oracle@jack bin]$ ./runInstaller -updateNodeList ORACLE_HOME=u01/app/19c/grid "CLUSTER_NODES={jack}" CRS=TRUE -local 
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 16370 MB    Passed
The inventory pointer is located at /etc/oraInst.loc

 

We are done with deleting a node.
Please do like comment and share if you like my work