Oracle单节点RAC添加节点(2)


2.2 Verify the integrity of the cluster and node3:
 $ cluvfy stage -pre nodeadd -n node3 [-fixup [-fixupdir fixup_dir]] [-verbose]
$ cluvfy stage -pre nodeadd -n jystdrac2 -fixup -fixupdir /tmp/fixupdir -verbose

截取部分检查结果如下(为节省篇幅,大部分passed的检查项都已删减掉):
[grid@jystdrac1 ~]$ cluvfy stage -pre nodeadd -n jystdrac2 -fixup -fixupdir /tmp/fixupdir -verbose

Performing pre-checks for node addition

Checking node reachability...

...

Checking CRS home location...
PRVG-1013 : The path "/opt/app/11.2.0/grid" does not exist or cannot be created on the nodes to be added
Result: Shared resources check for node addition failed

Interface information for node "jystdrac1"
 Name  IP Address      Subnet          Gateway        Def. Gateway    HW Address        MTU 
 ------ --------------- --------------- --------------- --------------- ----------------- ------
 eth2  192.168.1.61    192.168.1.0    0.0.0.0        UNKNOWN        08:00:27:E7:88:48 1500 
 eth2  192.168.1.62    192.168.1.0    0.0.0.0        UNKNOWN        08:00:27:E7:88:48 1500 
 eth2  192.168.1.65    192.168.1.0    0.0.0.0        UNKNOWN        08:00:27:E7:88:48 1500 
 eth3  10.10.10.61    10.10.10.0      0.0.0.0        UNKNOWN        08:00:27:83:CC:56 1500 
 eth3  169.254.203.60  169.254.0.0    0.0.0.0        UNKNOWN        08:00:27:83:CC:56 1500 


Interface information for node "jystdrac2"
 Name  IP Address      Subnet          Gateway        Def. Gateway    HW Address        MTU 
 ------ --------------- --------------- --------------- --------------- ----------------- ------
 eth2  192.168.1.63    192.168.1.0    0.0.0.0        UNKNOWN        08:00:27:0C:E1:B1 1500 
 eth3  10.10.10.63    10.10.10.0      0.0.0.0        UNKNOWN        08:00:27:B1:1B:CE 1500 

Checking for multiple users with UID value 0
Result: Check for multiple users with UID value 0 passed

Check: Current group ID
Result: Current group ID check passed

...

Checking OCR integrity...

OCR integrity check passed

Checking Oracle Cluster Voting Disk configuration...

Oracle Cluster Voting Disk configuration check passed
Check: Time zone consistency
Result: Time zone consistency check passed

...

Pre-check for node addition was unsuccessful on all the nodes.
[grid@jystdrac1 ~]$

我的环境在这里的检查项中,需要注意的主要就是确认目录的属主和权限:
[root@jystdrac2 opt]# ls -ld /opt/app
drwxr-xr-x. 3 root oinstall 4096 May 25 23:20 /opt/app
[root@jystdrac2 opt]# chown grid:oinstall /opt/app
[root@jystdrac2 opt]# chmod 775 /opt/app
[root@jystdrac2 opt]# ls -ld /opt/app
drwxrwxr-x. 3 grid oinstall 4096 May 25 23:20 /opt/app

2.3 GI添加节点


2.3 To extend the Grid Infrastructure home to the node3, navigate to the Grid_home/oui/bin directory on node1 and run the addNode.sh script using the following syntax, where node3 is the name of the node that you are adding and node3-vip is the VIP name for the node:

我这里实验就是 jystdrac2(没有使用GNS):
[grid@jystdrac1 bin]$ pwd
/opt/app/11.2.0/grid/oui/bin
[grid@jystdrac1 bin]$ ls
addLangs.sh  addNode.sh  attachHome.sh  detachHome.sh  filesList.bat  filesList.properties  filesList.sh  lsnodes  resource  runConfig.sh  runInstaller  runInstaller.sh  runSSHSetup.sh


$ ./addNode.sh "CLUSTER_NEW_NODES={jystdrac2}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={jystdrac2-vip}"
--下面这条命令是错误的,无法跳过添加节点前的检查:
--$ ./addNode.sh -force -ignorePrereq -ignoreSysPrereqs "CLUSTER_NEW_NODES={jystdrac2}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={jystdrac2-vip}"

最终确认正确跳过添加节点检查的方法是设置IGNORE_PREADDNODE_CHECKS变量(这里我耽误了一些时间,尝试了Oracle惯用的ignorePrereq和ignoreSysPrereqs发现都不对):
export IGNORE_PREADDNODE_CHECKS=Y
echo $IGNORE_PREADDNODE_CHECKS

$ ./addNode.sh "CLUSTER_NEW_NODES={jystdrac2}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={jystdrac2-vip}"

正常添加GI节点的输出如下:
-----------------------------------------------------------------------------

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/7ace98bb8e52c2bb9b87b4c748da92b0.html