RAC: How to delete and add a node in 19c RAC
| RAC: How to delete and add a node in 19c RAC (Doc ID 3019970.1) | 编辑To Bottom |
|---|

| In this Document | Goal |
|---|
| Solution |
|---|
Applies to:
Oracle Database Enterprise Edition Version 19.21及以上版本
Goal
- When a node is accessible, what steps should one take to remove it?
- What can be done if a node cannot be accessed for deletion?
- What actions are involved in manual removal of a node?
- What process is involved in adding a new node?
- What troubleshooting steps are necessary when adding or removing nodes?
Solution
NOTE: In the images shown below and in the following documents, user details such as cluster names, hostnames, directory paths, filenames, etc., stand for a fictional example (provided solely for illustrative purposes). There is no unintended resemblance to actual individuals or entities living or dead.
1. How to delete a node when the node is reachable?
By a root user, carry out the subsequent command on the node to be deleted:
cd $GI_home/crs/install
./rootcrs.sh -deconfig -force -verbose <<<<Make sure this is successful
From GI owner, go to $GI_home/deinstall and execute :
./deinstall -local <<<<Follow the onscreen instruction
1.2. Remove/Rename the following files and folder:
rm -rf $GRID_BASE <<<<Backup not needed
rm -rf /etc/oracle <<<<Backup not needed
rm -rf /var/tmp/.oracle <<<<Backup not needed
rm -f /etc/oraInst.loc <<<<Backup not needed
rm -f ora_inventory_location <<<<Backup needed
rm -f /etc/oratab <<<<Backup needed
1.3. Login to any working node and delete the node to be deleted as below:
crsctl delete node -n
1.4 The VIP of the node which was deleted as a root user was removed from the working node, and perform the necessary operations.
配置停止服务:<vip_name>此标记提示:通过执行以下命令可获取VIP名称:srvctl config nodeapps -a`
Srvctl remove vip -vip <vip_name>
1.5 Validate if the Node removed successfully or not as GI user, execute:
$GI_home/cluvfy stage -post nodedel -n
If the above command does not result in any error messages, the successful node deletion is achieved.
2. How to delete a node when the node is not reachable?
2.1.Login to the working node and execute as GI user:
cd $GI_home/oui/bin
./runInstaller --update-node-list ORACLE_HOME=
2.2. Login to any working node and delete the node to be deleted as below:
crsctl delete node -n
Upon visiting, delete the VIP of that node which was previously deleted as a root user, then proceed to execute.
shut down the VIP service instance <vip_name> and retrieve its name via the command line interface: srvctl config nodeapps -a
srvctl remove vip -vip <vip_name>
2.4. Validate if the Node removed successfully or not as GI user, execute:
$GRID_BASE/cluvfy stage -post nodedel -n
Only if the command executed in the previous step does not result in an error message being returned, will the node deletion be considered successful.
3. How to delete a node manually?
3.1. Stop the CRS on the node which is to be deleted as Root, execute:
$GRID_BASE/bin/crsctl stop crs -f
假如某个原因导致CRS无法停止运行,则需要禁用其自启动功能并将其节点作为Root用户重启,请执行:
$GRID_BASE/bin/crsctl disable crs
3.2. Login to the working node and execute as GI user:
cd $GI_home/oui/bin
完整指定GI目录路径
运行安装程序并更新节点列表后,请指定ORACLE_HOME环境变量为【完整指定GI目录路径
3.3. Remove/Rename the following files and folder:
rm -rf $GRID_BASE <<<<Backup not needed
rm -rf /etc/oracle <<<<Backup not needed
rm -rf /var/tmp/.oracle <<<<Backup not needed
rm -f /etc/oraInst.loc <<<<Backup not needed
rm -f ora_inventory_location <<<<Backup needed
rm -f /etc/oratab <<<<Backup needed
3.4. Login to any working node and delete the node to be deleted as below:
Use the crsctl command to remove a node with the name <nodename> using the -n flag. Note that the node's name is accessible via the olsnodes command.
3.5. On the working node, remove the VIP of the node that was deleted as a Root user, execute the following steps.
The command srvctl stop vip -vip <vip_name> can be retrieved via executing the command srvctl config nodeapps -a.
srvctl remove vip -vip <vip_name>
3.6. Validate if the Node removed successfully or not as GI user, execute:
$GRID_BASE/cluvfy stage -post nodedel -n
Only if no error messages are returned upon execution of the above command will the node deletion be successful.
4. How to add a node in RAC cluster?
4.1. Invoke the "cluvfy" tool for pre-add node validation, where each working node is a Generalized Involved Participant (GI) owner, to perform the necessary validation tasks:
$GRID_BASE/cluvfy stage --prefix nodeadd --n
4.2. Execute the following from GI owner on any working node:
cd $GRID_BASE/addnode
注
At the conclusion of the aforementioned steps, it is directed to run root.sh on the remote node assuming the role of a Root user thereupon executing:
$GRID_BASE/root.sh <<<<Check the log file and make sure this is successful.
If the above command does not result in any error messages, the insertion of a node is successful.
5. Troubleshooting during Node addition or deletion.
By the deletion of a node, log files will be generated within $GRID_BASE/crsdata/
5.2.Inspect the cluster alert logs within $GRID_BASE/diag/crs/
5.3. Check the deinstall logfile when executing ./deinstall -local
5.4. While performing node additions, log files will be generated within the
Upon execution of root.sh on a remote node, log files will be generated within the cluster directory located at $GRID_BASE/crsdata/
5.6. To check the VIP and Hostname, the following command can be executed:
hostname <<<<To get the public hostname
srvctl config nodeapps -a <<<<To get the VIP name
cat /etc/hosts <<<<To get the DNS names
||
