11gr2RAC剔除节点
11gR2rac 基于asm 基于administration-policy,
hostname rac1、rac2
dbname=orcl instance_name orcl1/orcl2
rac1 正常,rac2 丢失 lost
1. Reconfigure the RDBMS Services in the cluster to take into account node 2 is gone.
1.1重新配置节点1的service,这样service就只运行在rac1上
[oracle@rac1 ~]$ srvctl modify service -d orcl -s rac1 -n -i orcl1 -f
#有多个节点??????
1.2检查service是否从rac2上移除
[oracle@rac1 ~]$ srvctl status service -d orcl -s rac1 #此处的rac1是服务名,可以crsctl stat res -t中获得。
Service rac1 is running on instance(s) orcl1
2. Reconfigure the RDBMS Instances in the cluster to take into account node 2 is gone.
dbca instance management 删除一个instance
查看实例配置
[oracle@rac1 ~]$ srvctl config database -d orcl
Database unique name: orcl
Database name: orcl
Oracle home: /opt/app/oracle/database/11.2/db_1
Oracle user: oracle
Spfile: +DATA1/orcl/spfileorcl.ora
Domain: vmdom
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: orcl
Database instances: orcl1
Disk Groups: DATA1
Services: rac1
Database is administrator managed
[root@rac1 ~]# /opt/app/oracle/product/grid/bin/crsctl stat res -t
3. Remove the Node from the RAC Cluster
3.1使用runInstaller更新节点列表
[oracle@rac1 ~]$ cd $ORACLE_HOME/oui/bin
[oracle@rac1 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/opt/app/oracle/database/11.2/db_1 "CLUSTER_NODES={rac1}"
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 2601 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /opt/app/oracle/oraInventory
'UpdateNodeList' was successful.
4.将节点2从集群中移除
在正常节点rac1
4.1 停止节点2的vip
[root@rac1 bin]# ./srvctl stop vip -i rac2
4.2 移走节点2的vip
[root@rac1 bin]# ./srvctl remove vip -i rac2 -f
4.3 检查资源确保节点2的vip被移除
[root@rac1 bin]# ./crsctl stat res -t
..
ora.rac1.vip
1 ONLINE ONLINE rac1
..
4.4 Remove node 2, rac2 from the Grid Infrastructure/clusterware
If the node is pinned, try to unpin it first:
olsnodes -s -t
crsctl unpin css -n <node>
# crsctl delete node -n rac2
4.5 使用grid用户在节点1上
[root@rac1 bin]# su - oracle
[oracle@rac1 ~]$ . oraenv orcl1
[oracle@rac1 ~]$ cd $ORACLE_HOME/oui/bin
[oracle@rac1 ~]$ ./runInstaller -updateNodeList ORACLE_HOME=/u02/app/oracle/product/11.2.0/db_home "CLUSTER_NODES={rac1}" CRS=TRUE -silent
4.6 检查节点只剩下节点1
[root@rac1 bin]# ./olsnodes
rac1
11gR2rac 基于asm 基于administration-policy,
hostname rac1、rac2
dbname=orcl instance_name orcl1/orcl2
rac1 正常,rac2 丢失 lost
1. Reconfigure the RDBMS Services in the cluster to take into account node 2 is gone.
1.1重新配置节点1的service,这样service就只运行在rac1上
[oracle@rac1 ~]$ srvctl modify service -d orcl -s rac1 -n -i orcl1 -f
#有多个节点??????
1.2检查service是否从rac2上移除
[oracle@rac1 ~]$ srvctl status service -d orcl -s rac1 #此处的rac1是服务名,可以crsctl stat res -t中获得。
Service rac1 is running on instance(s) orcl1
2. Reconfigure the RDBMS Instances in the cluster to take into account node 2 is gone.
dbca instance management 删除一个instance
查看实例配置
[oracle@rac1 ~]$ srvctl config database -d orcl
Database unique name: orcl
Database name: orcl
Oracle home: /opt/app/oracle/database/11.2/db_1
Oracle user: oracle
Spfile: +DATA1/orcl/spfileorcl.ora
Domain: vmdom
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: orcl
Database instances: orcl1
Disk Groups: DATA1
Services: rac1
Database is administrator managed
[root@rac1 ~]# /opt/app/oracle/product/grid/bin/crsctl stat res -t
3. Remove the Node from the RAC Cluster
3.1使用runInstaller更新节点列表
[oracle@rac1 ~]$ cd $ORACLE_HOME/oui/bin
[oracle@rac1 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/opt/app/oracle/database/11.2/db_1 "CLUSTER_NODES={rac1}"
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 2601 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /opt/app/oracle/oraInventory
'UpdateNodeList' was successful.
4.将节点2从集群中移除
在正常节点rac1
4.1 停止节点2的vip
[root@rac1 bin]# ./srvctl stop vip -i rac2
4.2 移走节点2的vip
[root@rac1 bin]# ./srvctl remove vip -i rac2 -f
4.3 检查资源确保节点2的vip被移除
[root@rac1 bin]# ./crsctl stat res -t
..
ora.rac1.vip
1 ONLINE ONLINE rac1
..
4.4 Remove node 2, rac2 from the Grid Infrastructure/clusterware
If the node is pinned, try to unpin it first:
olsnodes -s -t
crsctl unpin css -n <node>
# crsctl delete node -n rac2
4.5 使用grid用户在节点1上
[root@rac1 bin]# su - oracle
[oracle@rac1 ~]$ . oraenv orcl1
[oracle@rac1 ~]$ cd $ORACLE_HOME/oui/bin
[oracle@rac1 ~]$ ./runInstaller -updateNodeList ORACLE_HOME=/u02/app/oracle/product/11.2.0/db_home "CLUSTER_NODES={rac1}" CRS=TRUE -silent
4.6 检查节点只剩下节点1
[root@rac1 bin]# ./olsnodes
rac1