ITPub博客

首页 > 数据库 > Oracle > Oracle 10g RAC删除、增加节点

Oracle 10g RAC删除、增加节点

原创 Oracle 作者:parknkjun 时间:2014-03-22 11:11:48 0 删除 编辑
一、查看状态
[root@rac1 bin]# ./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    rac2        
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        
二、停止ASM实例
[root@rac1 bin]# ./srvctl stop asm -n rac1 -i +ASM1
[root@rac1 bin]# ./crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora....B1.inst application    OFFLINE   OFFLINE               
ora....B2.inst application    ONLINE    ONLINE    rac2        
ora.RACDB.db   application    ONLINE    ONLINE    rac1        
ora....SM1.asm application    OFFLINE   OFFLINE               
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    OFFLINE               
ora.rac2.gsd   application    ONLINE    ONLINE    rac2        
ora.rac2.ons   application    ONLINE    ONLINE    rac2        
ora.rac2.vip   application    ONLINE    OFFLINE             


三、移除ASM实例
[root@rac1 bin]# ./srvctl remove asm -n rac1 -i +ASM1
PRKS-1023 : Failed to remove CRS resource for ASM instance "+ASM1" on node "rac1", [CRS-0214: Could not unregister resource 'ora.rac1.ASM1.asm'.]


四、取消DB实例与ASM实例
[root@rac1 bin]# ./crs_unregister ora.RACDB.RACDB1.inst
[root@rac1 bin]# ./crs_unregister ora.rac1.ASM1.asm


五、查看状态、ASM与DB实例已经没有了
[root@rac1 bin]# ./crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora....B2.inst application    OFFLINE   OFFLINE               
ora.RACDB.db   application    OFFLINE   OFFLINE               
ora....C1.lsnr application    OFFLINE   OFFLINE               
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       
六、查看节点信息
[root@rac1 bin]# ./olsnodes -n
rac1    1
rac2    2


七、在另外一个节点上、root用户下执行删除脚本
su - root


cd $ORACLE_HOME/install
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/crs_1
[root@rac2 install]# ./rootdeletenode.sh rac1
CRS nodeapps are deleted successfully
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Node deletion operation successful.
'rac1' deleted successfully
八、查看状态
[root@rac2 bin]# ./crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora....B2.inst application    OFFLINE   OFFLINE               
ora.RACDB.db   application    OFFLINE   OFFLINE               
ora....C1.lsnr application    OFFLINE   OFFLINE               
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   
九、移除节点
[root@rac2 bin]# ./srvctl remove nodeapps -n rac1
Please confirm that you intend to remove the node-level applications on node rac1 (y/[n]) y
PRKO-2108 : Node applications are still running on node: rac1
十、查看状态
[root@rac2 bin]# ./crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora....B2.inst application    OFFLINE   OFFLINE               
ora.RACDB.db   application    OFFLINE   OFFLINE               
ora....C1.lsnr application    OFFLINE   OFFLINE               
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   
十一、取消LISTENER、VIP、GSD、ONS服务注册
[root@rac2 bin]# ./crs_stat -l|grep C1.lsnr
NAME=ora.rac1.LISTENER_RAC1.lsnr
[root@rac2 bin]# ./crs_unregister ora.rac1.LISTENER_RAC1.lsnr


[root@rac2 bin]# ./crs_stop ora.rac1.vip
Attempting to stop `ora.rac1.vip` on member `rac1`
Stop of `ora.rac1.vip` on member `rac1` succeeded.
[root@rac2 bin]# ./crs_unregister ora.rac1.vip


[root@rac2 bin]# ./crs_stop ora.rac1.gsd
Attempting to stop `ora.rac1.gsd` on member `rac1`
Stop of `ora.rac1.gsd` on member `rac1` succeeded.
[root@rac2 bin]# ./crs_unregister ora.rac1.gsd


[root@rac2 bin]# ./crs_stop ora.rac1.ons
Attempting to stop `ora.rac1.ons` on member `rac1`
Stop of `ora.rac1.ons` on member `rac1` succeeded.
[root@rac2 bin]# ./crs_unregister ora.rac1.ons
十二、查看状态
[root@rac2 bin]# ./crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora....B2.inst application    OFFLINE   OFFLINE               
ora.RACDB.db   application    OFFLINE   OFFLINE               
ora....SM2.asm application    ONLINE    OFFLINE               
ora....C2.lsnr application    ONLINE    OFFLINE               
ora.rac2.gsd   application    ONLINE    ONLINE    rac2        
ora.rac2.ons   application    ONLINE    ONLINE    rac2        
ora.rac2.vip   application    ONLINE    ONLINE    rac1      


十三、在另外一个节点、ORACLE用户下
$ORACLE_HOME/oui/bin
[oracle@rac2 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 CLUSTER_NODES=rac2
Starting Oracle Universal Installer...


No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
'UpdateNodeList' was successful.


十四、在被删除节点上
设置export ORACLE_HOME=...
su - root
cd $CRS_HOME
[root@rac1 install]# export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
[root@rac1 install]# ./rootdelete.sh remote nosharedvar
CRS-0210: Could not find resource 'ora.RACDB.RACDB1.inst'.


CRS-0210: Could not find resource 'ora.rac1.LISTENER_RAC1.lsnr'.
CRS-0210: Could not find resource 'ora.rac1.ons'.
CRS-0210: Could not find resource 'ora.rac1.vip'.
CRS-0210: Could not find resource 'ora.rac1.gsd'.
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'
十五、在另外节点:
su - root
cd $CRS_HOME/install:
./rootdeletenode.sh rac1,1
[root@rac2 install]# ./rootdeletenode.sh rac1,1
CRS-0210: Could not find resource 'ora.rac1.LISTENER_RAC1.lsnr'.
CRS-0210: Could not find resource 'ora.rac1.ons'.
CRS-0210: Could not find resource 'ora.rac1.vip'.
CRS-0210: Could not find resource 'ora.rac1.gsd'.
CRS-0210: Could not find resource ora.rac1.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.noderac1 marked for deletion is not there. Ignoring.
Successfully deleted 5 keys from OCR.
Node deletion operation successful.
'rac1,1' deleted successfully
十六、查看节点信息
[root@rac2 bin]# ./olsnodes -n
rac2    2
十七、在另外节点:
su - oracle
cd $CRS_HOME/oui/bin 
[oracle@rac2 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/u01/app/oracle/prodcut/10.2.0/db_1/bin CLUSTER_NODES=rac2
Starting Oracle Universal Installer...


No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
如果清除失败:
[oracle@rac2 bin]$ ./runInstaller -updateNodeList -noClusterEnable -local ORACLE_HOME=/u01/app/oracle/product/10.2.0/crs_1/bin CLUSTER_NODES=rac2
[oracle@rac2 bin]$ ./olsnodes -n
rac2    2
十八
添加节点:
图形界面:
$CRS_HOME/oui/bin/addNode.sh






十九、查看节点
[root@rac2 bin]# ./crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora....B2.inst application    ONLINE    ONLINE    rac2        
ora.RACDB.db   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


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10271187/viewspace-1127179/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
请登录后发表评论 登录
全部评论
DBA攻城狮

注册时间:2008-02-11

  • 博文量
    115
  • 访问量
    539022