- 最后登录
- 2015-10-6
- 在线时间
- 48 小时
- 威望
- 500
- 金钱
- 1561
- 注册时间
- 2012-12-6
- 阅读权限
- 100
- 帖子
- 125
- 精华
- 3
- 积分
- 500
- UID
- 777
|
8#
发表于 2013-6-5 17:21:27
To delete a node from a cluster:
Ensure that Grid_home correctly specifies the full directory path for the Oracle Clusterware home on each node, where Grid_home is the location of the installed Oracle Clusterware software.
Run the following command as either root or the user that installed Oracle Clusterware to determine whether the node you want to delete is active and whether it is pinned:
$ olsnodes -s -t
If the node is pinned, then run the crsctl unpin css command. Otherwise, proceed to the next step.
Disable the Oracle Clusterware applications and daemons running on the node. Run the rootcrs.pl script as root from the Grid_home/crs/install directory on the node to be deleted, as follows:
Note:
Before you run this command, you must stop the EMAGENT, as follows:
$ emctl stop dbconsole
If you are using Oracle Clusterware 11g release 2 (11.2.0.1) or Oracle Clusterware 11g release 2 (11.2.0.2), then do not include the -deinstall flag when running the rootcrs.pl script.
# ./rootcrs.pl -deconfig -deinstall -force
If you are deleting multiple nodes, then run the rootcrs.pl script on each node that you are deleting.
If you are deleting all nodes from a cluster, then append the -lastnode option to the preceding command to clear OCR and the voting disks, as follows:
# ./rootcrs.pl -deconfig -deinstall -force -lastnode
Caution:
Only use the -lastnode option if you are deleting all cluster nodes because that option causes the rootcrs.pl script to clear OCR and the voting disks of data.
Note:
If you do not use the -force option in the preceding command or the node you are deleting is not accessible for you to execute the preceding command, then the VIP resource remains running on the node. You must manually stop and remove the VIP resource using the following commands as root from any node that you are not deleting:
# srvctl stop vip -i vip_name -f
# srvctl remove vip -i vip_name -f
Where vip_name is the VIP for the node to be deleted. If you specify multiple VIP names, then separate the names with commas and surround the list in double quotation marks ("").
From any node that you are not deleting, run the following command from the Grid_home/bin directory as root to delete the node from the cluster:
# crsctl delete node -n node_to_be_deleted
On the node you want to delete, run the following command as the user that installed Oracle Clusterware from the Grid_home/oui/bin directory where node_to_be_deleted is the name of the node that you are deleting:
$ ./runInstaller -updateNodeList ORACLE_HOME=Grid_home "CLUSTER_NODES=
{node_to_be_deleted}" CRS=TRUE -silent -local
On the node that you are deleting, depending on whether you have a shared or local Oracle home, complete one of the following procedures as the user that installed Oracle Clusterware:
If you have a shared home, then run the following command from the Grid_home/oui/bin directory on the node you want to delete:
$ ./runInstaller -detachHome ORACLE_HOME=Grid_home -silent -local
Manually delete the following files:
/etc/oraInst.loc
/etc/oratab
/etc/oracle/
/opt/ORCLfmap/
$OraInventory/
For a local home, deinstall the Oracle Clusterware home from the node that you want to delete, as follows, by running the following command, where Grid_home is the path defined for the Oracle Clusterware home:
$ Grid_home/deinstall/deinstall –local
Caution:
If you do not specify the -local flag, then the command removes the Grid Infrastructure home from every node in the cluster.
On any node other than the node you are deleting, run the following command from the Grid_home/oui/bin directory where remaining_nodes_list is a comma-delimited list of the nodes that are going to remain part of your cluster:
$ ./runInstaller -updateNodeList ORACLE_HOME=Grid_home "CLUSTER_NODES=
{remaining_nodes_list}" CRS=TRUE -silent
Notes:
You must run this command a second time where ORACLE_HOME=ORACLE_HOME, and CRS=TRUE -silent is omitted from the syntax, as follows:
$ ./runInstaller -updateNodeList ORACLE_HOME=ORACLE_HOME
"CLUSTER_NODES={remaining_nodes_list}"
If you have a shared Oracle Grid Infrastructure home, then append the -cfs option to the command example in this step and provide a complete path location for the cluster file system.
Run the following CVU command to verify that the specified nodes have been successfully deleted from the cluster:
$ cluvfy stage -post nodedel -n node_list [-verbose] |
|