首页 > 代码库 > 【Oracle】RAC删除节点
【Oracle】RAC删除节点
环境:
OS:OEL5.6
RAC:10.2.0.1.0
目前有rac1,rac2,rac3三个节点,以下是删除rac3节点的详细过程
1.删除rac3节点上的数据库实例
[oracle@rac1 ~]$ dbca -silent -deleteInstance -gdbName RACDB -instanceName RACDB3 -sysDBAUserName sys -sysDBAPassword oracle
Deleting instance
20% complete
21% complete
22% complete
26% complete
33% complete
40% complete
46% complete
53% complete
60% complete
66% complete
Completing instance management.
70% complete
73% complete
76% complete
80% complete
100% complete
Look at the log file "/u01/app/oracle/product/10.2.0/db_2/cfgtoollogs/dbca/RACDB.log" for further details.
2.删除rac3节点上的ASM实例
[oracle@rac1 ~]$ srvctl stop asm -n rac3
[oracle@rac1 ~]$ srvctl remove asm -n rac3
3.删除rac3节点上的监听
[oracle@rac1 ~]$ netca
4.删除节点3上的$ORACLE_HOME目录
[oracle@rac3 ~]$ rm -rf $ORACLE_HOME
更新保留节点的ORACLE_HOME信息
[oracle@rac1 ~]$ cd $ORACLE_HOME/oui/bin
[oracle@rac1 bin]$ ./runInstaller -updateNodelist ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_2 "CLUSTER_NODES=rac1,rac2"
Starting Oracle Universal Installer...
No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
‘UpdateNodeList‘ was successful.
5.清除rac上配置信息
rac3节点上:
[oracle@rac3 ~]$ cat $CRS_HOME/opmn/conf/ons.config
localport=6113
remoteport=6200
loglevel=3
useocr=on
rac1节点上:
[oracle@rac1 bin]$ racgons remove_config rac3:6200
6.删除rac3节点
rac3节点上:
[root@rac3 ~]# cd /u01/app/oracle/product/10.2.0/db_1/install (CRS_HOME)
[root@rac3 install]# ./rootdelete.sh
Shutting down Oracle Cluster Ready Services (CRS):
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Shutdown has begun. The daemons should exit soon.
Checking to see if Oracle CRS stack is down...
Oracle CRS stack is not running.
Oracle CRS stack is down now.
Removing script for Oracle Cluster Ready services
Updating ocr file for downgrade
Cleaning up SCR settings in ‘/etc/oracle/scls_scr‘
这时候已经删除rac3上的CRS
[oracle@rac1 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.inst application ONLINE ONLINE rac1
ora....B2.inst application ONLINE ONLINE rac2
ora.RACDB.db application ONLINE ONLINE rac1
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
但是此时通过olsnodes查看仍未三个节点
[root@rac1 bin]# ./olsnodes -n
rac1 1
rac2 2
rac3 3
从集群中删除节点并更新OCR:
[root@rac1 install]# ./rootdeletenode.sh rac3
CRS nodeapps are deleted successfully
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Node deletion operation successful.
‘rac3‘ deleted successfully
rac3节点运行OUI删除CRS安装目录
[oracle@rac3 ~]$ cd $CRS_HOME
[oracle@rac3 db_1]$ cd oui/
[oracle@rac3 oui]$ cd bin/
[oracle@rac3 bin]$ ./runInstaller -deinstall -silent "REMOVE_HOMES={/u01/app/oracle/product/10.2.0/db_1}" CRS=TRUE -local
Starting Oracle Universal Installer...
No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-08-25_02-14-19PM. Please wait ...[oracle@rac3 bin]$ Oracle Universal Installer, Version 10.2.0.1.0 Production
Copyright (C) 1999, 2005, Oracle. All rights reserved.
Starting deinstall
Deinstall in progress (Mon Aug 25 14:14:23 CST 2014)
WARNING:The directory: /u01/app/oracle/product/10.2.0/db_1 will be deleted after deinstall.
Click on "Yes" to continue.
Click on "No" to perform deinstall without deleting the directory.
Click on "Cancel" to go back to "Inventory Dialog".
............................................................... 100% Done.
Deinstall successful
End of install phases.(Mon Aug 25 14:14:42 CST 2014)
End of deinstallations
Please check ‘/u01/app/oracle/oraInventory/logs/silentInstall2014-08-25_02-14-19PM.log‘ for more details.
在rac1节点上更新集群节点信息
[oracle@rac1 ~]$ cd $CRS_HOME/oui/bin/
[oracle@rac1 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 "CLUSTER_NODES=rac1,rac2" CRS=TRUE
Starting Oracle Universal Installer...
No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
‘UpdateNodeList‘ was successful.
至此节点rac3删除完毕
【Oracle】RAC删除节点