如何删除集群节点
正常删除集群节点—集群正常运行中,出于更换硬件等的要求删除节点。下面模拟这个过程。
前提:2节点集群,RAC1,RAC2 ,删除RAC2节点
1 确认GRID_HOME,集群安装软件目录
[grid@rac2 asm]$ echo $ORACLE_HOME
/oracle/asm
2 查询节点状态,是否pin住
[root@rac2 ~]# olsnodes -s -t
rac1 Active Unpinned
rac2 Active Unpinned
3 卸载集群软件
[root@rac2 install]# ./rootcrs.pl -deconfig -force
Using configuration parameter file: ./crsconfig_params
PRCR-1070 : Failed to check if resource ora.rac2.vip is registered
Cannot communicate with crsd
PRCR-1070 : Failed to check if resource ora.gsd is registered
Cannot communicate with crsd
PRCR-1070 : Failed to check if resource ora.ons is registered
Cannot communicate with crsd
CRS-2797: Shutdown is already in progress for 'rac2', waiting for it to complete
CRS-2797: Shutdown is already in progress for 'rac2', waiting for it to complete
CRS-4133: Oracle High Availability Services has been stopped.
Removing Trace File Analyzer
Successfully deconfigured Oracle clusterware stack on this node
4 在其保留节点执行如下操作,删除集群对节点2的记录信息
[root@rac1 ~]# crsctl delete node -n rac2
CRS-4661: Node rac2 successfully deleted.
5 在RAC2 更新节点列表
[grid@rac2 ~]$ cd /oracle/asm/oui/bin
[grid@rac2 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/oracle/asm "CLUSTER_NODES={rac2}" CRS=TRUE -local;
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 1998 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /oracle/oraInventory
'UpdateNodeList' was successful.
6 删除节点RAC2的集群软件
grid@rac2 asm]$ cd /oracle/asm/deinstall/
[grid@rac2 deinstall]$ ./deinstall -local <<<<按照提示执行,中间需要跑一个脚本
7 在保留节点更新节点列表
[grid@rac1 ~]$ cd $ORACLE_HOME/oui/bin
[grid@rac1 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/oracle/asm "CLUSTER_NODES={rac1}" CRS=TRUE;
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 2046 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /oracle/oraInventory
'UpdateNodeList' was successful.
8运行CVU确认指定节点已经正常删除
[grid@rac1 ~]$ cd $ORACLE_HOME/oui/bin
[grid@rac1 bin]$ cluvfy stage -post nodedel -n rac2 -verbose;
Performing post-checks for node removal
Checking CRS integrity...
Clusterware version consistency passed
The Oracle Clusterware is healthy on node "rac1"
CRS integrity check passed
Result:
Node removal check passed
Post-check for node removal was successful.
9 检查节点状态
[grid@rac1 bin]$ olsnodes -s -t
rac1 Active Unpinned
[grid@rac1 bin]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE rac1
ora.ASMOCR.dg
ONLINE ONLINE rac1
ora.ASMVG1.dg
ONLINE ONLINE rac1
ora.LISTENER.lsnr
ONLINE ONLINE rac1
ora.asm
ONLINE ONLINE rac1 Started
ora.gsd
OFFLINE OFFLINE rac1
ora.net1.network
ONLINE ONLINE rac1
ora.ons
ONLINE ONLINE rac1
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rac1
ora.cvu
1 ONLINE ONLINE rac1
ora.oc4j
1 ONLINE ONLINE rac1
ora.orcl.db
1 ONLINE ONLINE rac1 Open
2 ONLINE OFFLINE Instance Shutdown
ora.rac1.vip
1 ONLINE ONLINE rac1
ora.rac2.vip
1 ONLINE INTERMEDIATE rac1 FAILED OVER
ora.scan1.vip
1 ONLINE ONLINE rac1
至此,完整删除集群的RAC2节点。
相关文章