Monday, February 12, 2018

Deleting a node from the cluster

Deleting a node from cluster

Stop the database and ASM in the node.
Remove the database and ASM.
Remove the database software.
Remove the cluster software.
Update the Oracle inventory.

olsnodes command list the nodes and other information for all the nodes in the cluster.

olsnodes
olsnodes -n lists the nodes that are participating in the cluster with node numbers.
olsnodes -i lists the nodes that are participating in the cluster with VIPs.
olsnodes -s lists node status
olsnodes -a lists node mode
olsnodes -t lists the nodes that are pinned/unpinned
olsnodes -l -p lists the IP of private interconnect on the node where command is executed.

Current state

As Oracle user, olsnodes -s -t
srvctl status database -d ORCL -verbose
select inst_id,instance_name,status,to_char(startup_time,'mm/dd/yyyy hh24:mi:ss') "STARTUP_TIME" from gv$instance order by inst_id;

1. Stop the instance

srvctl stop instance -d ORCL -i ORCL3
srvctl status database -d ORCL -verbose

2. Remove the instance

srvctl remove instance -d ORCL -i ORCL3

3. Disable Oracle clusterware on Node 3

As root,

cd $GRID_HOME/crs/install
./rootcrs.pl -deconfig -deinstall -force

4. Disable and stop the listener on node 3

As root,

srvctl stop vip -i ORCL3-VIP -f
srvctl remove vip -i ORCL3-VIP -f

5. Delete the node, Run the below command as root user from surviving node node 1.

As root,

cd $GRID_HOME/bin
./crsctl delete node -n node3

6. Update the inventory for grid home.

cd $GRID_HOME/oui/bin
./runInstaller -updateNodeList ORACLE_HOME=/u01/app/grid/product/11.2.0/grid "CLUSTER_NODE={node1,node2}" CRS=TRUE

7. Remove the database home

cd $ORACLE_HOME/deinstall
./deinstall -local

8. Update the inventory for oracle home

cd $ORACLE_HOME/oui/bin
./runInstaller -updateNodeList ORACLE_HOME=/u01/app/oracle/product/11.2.0 "CLUSTER_NODE={node1,node2}"

9. Post deletion steps



rm -rf /etc/oraInst.loc
rm -rf /etc/oracle
rm -rf /opt/ORCLfmap
rm -rf /etc/oratab
rm -rf /u01
groupdel dba oinstall
rm -rf /u01/app/oracle

No comments:

Post a Comment