sitemap

RSS地图

收藏本站

设为首页

Oracle研究中心

当前位置:Oracle研究中心 > 故障案例 >

【案例】Oracle RAC强制删除node节点过程的详细笔记

时间:2016-11-16 21:18   来源:Oracle研究中心   作者:网络   点击:

天萃荷净 Oracle研究中心案例分析:分享一篇关于Oracle RAC节点间操作的笔记,详细介绍如何强制删除Oracle RAC中的节点。
本站文章除注明转载外,均为本站原创: 转载自love wife & love life —Roger 的Oracle技术博客
本文链接地址: 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  Oracleо  OFFLINE             
ora....ac2.ons application    ONLINE    OFFLINE             
ora....ac2.vip application    ONLINE    ONLINE    callrac1

1.移除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  ==== 这里报错先不管 ====

2.将信息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  

3.更新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.

4.执行 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

5.检查cluster node情况

[root@callrac1 bin]# pwd
/home/oracle/product/10.2.0/crs/bin

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

callrac1        1

--------------------------------------ORACLE-DBA----------------------------------------

最权威、专业的Oracle案例资源汇总之【案例】Oracle RAC强制删除node节点过程的详细笔记

本文由大师惜分飞原创分享,网址:http://www.oracleplus.net/arch/1286.html

Oracle研究中心

关键词:

Oracle RAC添加节点

如何在Rac删除节点