Linux rac delete node小记

上周给客户做了一个add node for single rac的操作,后来客户说主机有问题,
换了一台新的主机,于是今天又到现场了。在add操作之前,首先要将原node
信息从cluster中清除。 如下是简单的记录:
####  Delete node for Linux rac ####

检查当前系统环境资源如下:

[oracle@callrac1 bin]$ ./crs_stat -t

Name           Type           Target    State     Host
------------------------------------------------------------
ora....b1.inst application    ONLINE    ONLINE    callrac1
ora.calldb.db  application    ONLINE    ONLINE    callrac1
ora....SM1.asm application    ONLINE    ONLINE    callrac1
ora....C1.lsnr application    ONLINE    ONLINE    callrac1
ora....ac1.gsd application    ONLINE    ONLINE    callrac1
ora....ac1.ons application    ONLINE    ONLINE    callrac1
ora....ac1.vip application    ONLINE    ONLINE    callrac1
ora....SM2.asm application    ONLINE    OFFLINE
ora....C2.lsnr application    ONLINE    OFFLINE
ora....ac2.gsd application    ONLINE    OFFLINE
ora....ac2.ons application    ONLINE    OFFLINE
ora....ac2.vip application    ONLINE    ONLINE    callrac1

++++ 移除nodeapp ++++

[root@callrac1 bin]# ./srvctl remove  nodeapps -n callrac2

Please confirm that you intend to remove the node-level applications on node callrac2 (y/[n]) y
PRKO-2108 : Node applications are still running on node: callrac2  ==== 这里报错先不管 ====

++++ 将信息crs中2节点的资源信息从ocr中清除 ++++

[root@callrac1 bin]# ./crs_unregister ora.callrac2.LISTENER_CALLRAC2.lsnr
[root@callrac1 bin]# ./crs_unregister ora.callrac2.vip

CRS-0214: Could not unregister resource 'ora.callrac2.vip'.

[root@callrac1 bin]# ./crs_unregister ora.callrac2.ASM2.asm
[root@callrac1 bin]# ./crs_unregister ora.callrac2.gsd
[root@callrac1 bin]# ./crs_unregister ora.callrac2.ons


[oracle@callrac1 bin]$ ./crs_stat -t

Name           Type           Target    State     Host
------------------------------------------------------------
ora....b1.inst application    ONLINE    ONLINE    callrac1
ora.calldb.db  application    ONLINE    ONLINE    callrac1
ora....SM1.asm application    ONLINE    ONLINE    callrac1
ora....C1.lsnr application    ONLINE    ONLINE    callrac1
ora....ac1.gsd application    ONLINE    ONLINE    callrac1
ora....ac1.ons application    ONLINE    ONLINE    callrac1
ora....ac1.vip application    ONLINE    ONLINE    callrac1
ora....ac2.vip application    ONLINE    ONLINE    callrac1

[root@callrac1 bin]# ./crs_stop -f ora.callrac2.vip

Attempting to stop `ora.callrac2.vip` on member `callrac1`
Stop of `ora.callrac2.vip` on member `callrac1` succeeded.

[root@callrac1 bin]# ./crs_stop -f ora.callrac2.vip

Attempting to stop `ora.callrac2.vip` on member `callrac1`
Stop of `ora.callrac2.vip` on member `callrac1` succeeded.

[root@callrac1 bin]# ./crs_unregister ora.callrac2.vip

[oracle@callrac1 bin]$ crs_stat -t

Name           Type           Target    State     Host
------------------------------------------------------------
ora....b1.inst application    ONLINE    ONLINE    callrac1
ora.calldb.db  application    ONLINE    ONLINE    callrac1
ora....SM1.asm application    ONLINE    ONLINE    callrac1
ora....C1.lsnr application    ONLINE    ONLINE    callrac1
ora....ac1.gsd application    ONLINE    ONLINE    callrac1
ora....ac1.ons application    ONLINE    ONLINE    callrac1
ora....ac1.vip application    ONLINE    ONLINE    callrac1


++++ 更新cluster node ++++

[oracle@callrac1 bin]$ ./runInstaller -updateNodelist ORACLE_HOME=/home/oracle/product/10.2.0/db_1 "CLUSTER_NODES=callrac1"

Starting Oracle Universal Installer...

No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /home/oracle/oraInventory
'UpdateNodeList' was successful.

[oracle@callrac1 bin]$ cd $ORA_CRS_HOME/oui/bin
[oracle@callrac1 bin]$ ls

addLangs.sh  addNode.sh  attachHome.sh  detachHome.sh  lsnodes
ouica.bat  ouica.sh  resource  runConfig.sh  runInstaller  runInstaller.sh

[oracle@callrac1 bin]$ ./runInstaller -updateNodelist ORACLE_HOME=/home/oracle/product/10.2.0/crs "CLUSTER_NODES=callrac1"

Starting Oracle Universal Installer...

No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /home/oracle/oraInventory
'UpdateNodeList' was successful.

++++ 执行 rootdeletenode.sh ++++

[root@callrac1 install]# pwd

/home/oracle/product/10.2.0/crs/install

[root@callrac1 install]# ./rootdeletenode.sh callrac2,2

CRS-0210: Could not find resource 'ora.callrac2.ons'.
CRS-0210: Could not find resource 'ora.callrac2.vip'.
CRS-0210: Could not find resource 'ora.callrac2.gsd'.
CRS-0210: Could not find resource ora.callrac2.vip.
CRS nodeapps are deleted successfully
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Successfully deleted 14 values from OCR.
Key SYSTEM.css.interfaces.nodecallrac2 marked for deletion is not there. Ignoring.
Successfully deleted 5 keys from OCR.
Node deletion operation successful.
'callrac2,2' deleted successfully

++++ 检查cluster node情况 ++++

[root@callrac1 bin]# pwd

/home/oracle/product/10.2.0/crs/bin

[root@callrac1 bin]# ./olsnodes -n

callrac1        1


评论

  1. 只有删除步骤,添加步骤没写

  2. 添加的在前面做了,呵呵

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注