Linux 5.4在安装rac执行root.sh Failed to upgrade Oracle Cluster Registry configuration故障处理

因为oracle 10g版权被全省买断,11g没有买版权所以朋友要在Red hat Linux 5.4下使用裸设备来安装oracle 10g rac数据库。但在安装过程出现了一些错误 到节点2上用root用户身份执行/u01/app/oracle/product/10.2.0/crs下的root.sh:
/u01/app/product/10.2.0/crs/jdk/jre//bin/java: error while loading shared libraries:
libpthread.so.0: cannot open shared object file: No such file or directory

节点2上执行root.sh之前需要编辑两个文件,这两个文件都位于/u01/app/oracle/product/10.2.0/crs/bin下,文件名分别为vipca和srvctl。首先编辑vipca文件,找到如下内容:
Remove this workaround when the bug 3937317 is fixed arch=`uname -m`

if [ “$arch” = “i686” -o “$arch” = “ia64” ]
then
LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL
fi
#End workaround
在fi 后新添加一行:
unset LD_ASSUME_KERNEL
然后编辑srvctl文件,找到如下内容:
LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL
同样在其后新增加一行: unset LD_ASSUME_KERNEL

同时需要你改的还有节点1上的$ORACLE_HOME/bin/srvctl 文件,不然等装完数据库之后,srvctl 命令也是会报这个错误地。

再次执行root.sh脚本报错:Failed to upgrade Oracle Cluster Registry configuration
[root@rac2 crs]#./u01/app/oracle/product/10.2.0/crs/root.sh
WARNING: directory ‘/u01/app/oracle/product’ is not owned by root
WARNING: directory ‘/u01/app/oracle’ is not owned by root
WARNING: directory ‘/u01/app’ is not owned by root
WARNING: directory ‘/u01’ is not owned by root
Checking to see if Oracle CRS stack is already configured

Setting the permissions on OCR backup directory
Setting up NS directories
PROT-1: Failed to initialize ocrconfig
Failed to upgrade Oracle Cluster Registry configuration
一般出现这个问题的原因有几种:

(1) Bug
这种情况参考:
Executing root.sh errors with “Failed To Upgrade Oracle Cluster Registry Configuration” [ID 466673.1]
(2) raw 设备的权限问题
[root@rac2 /]# ls -lrt /dev/raw/
total 0
crw-rw—- 1 oracle oinstall 162, 4 Nov 10 23:34 raw4
crw-rw—- 1 oracle oinstall 162, 3 Nov 10 23:34 raw3
crw-rw—- 1 root oinstall 162, 2 Nov 10 23:34 raw2
crw-rw—- 1 root oinstall 162, 1 Nov 10 23:34 raw1

权限要设置成如下:
chown root.oinstall /dev/raw/raw[1-2]
chown oracle.oinstall /dev/raw/raw[3-5]

chmod 775 /dev/raw/raw[1-2]
chmod 775 /dev/raw/raw[3-5]

可以在udev的规则里设置

(3) raw 设备读写问题
这种情况参考:
Placement of Voting disk and OCR Files in Oracle RAC 10g and 11gR1 [ID 293819.1]
清空一下RAW:
[root@rac2 raw]# dd if=/dev/zero of=/dev/mapper/crsp6 bs=1M count=200

我这里是属于bug用clsfmt检查raw 设备
[root@rac2 bin]# ./clsfmt.bin ocr /dev/raw/raw1
clsfmt: Received unexpected error 4 from skgfifi
skgfifi: Additional information: -2
Additional information: -1073741824

这里没有成功是bug
用Pathch中的新文件替换clsfmt.bin 文件
[root@rac2 4679769]# cp clsfmt.bin /u01/app/oracle/product/10.2.0/crs/bin/

再次测试:
[root@rac2 bin]# ./clsfmt.bin ocr /dev/raw/raw1
clsfmt: successfully initialized file /dev/raw/raw1
[root@rac2 bin]# ./clsfmt.bin ocr /dev/raw/raw2
clsfmt: successfully initialized file /dev/raw/raw2
[root@rac2 bin]# ./clsfmt.bin ocr /dev/raw/raw3
clsfmt: successfully initialized file /dev/raw/raw3
[root@rac2 bin]# ./clsfmt.bin ocr /dev/raw/raw4
clsfmt: successfully initialized file /dev/raw/raw4

[root@jy2 bin]# ./clsfmt.bin ocr /dev/raw/raw1
clsfmt: successfully initialized file /dev/raw/raw1
[root@jy2 bin]# ./clsfmt.bin ocr /dev/raw/raw2
clsfmt: successfully initialized file /dev/raw/raw2
[root@jy2 bin]# ./clsfmt.bin ocr /dev/raw/raw3
clsfmt: successfully initialized file /dev/raw/raw3
[root@jy2 bin]# ./clsfmt.bin ocr /dev/raw/raw4
clsfmt: successfully initialized file /dev/raw/raw4

再次执行root.sh报如上错误:
Error 0(Native: listNetInterfaces:[3])
[Error 0(Native: listNetInterfaces:[3])]
You have mail in /var/spool/mail/root
Error 0(Native: listNetInterfaces:[3])
[Error 0(Native: listNetInterfaces:[3])]

解决方式如下:
[root@rac2 crs]# cd bin
[root@rac2 bin]# ./oifcfg iflist
eth0 192.168.1.0
eth1 192.168.1.0
[root@rac2 bin]# ./oifcfg setif -global eth0/192.168.1.0:public
[root@rac2 bin]# ./oifcfg setif -global eth1/192.168.1.0:cluster_interconnect
[root@rac2 bin]# ./oifcfg getif
eth0 192.168.1.0 global public
eth1 192.168.1.0 global cluster_interconnect

补丁文件:
p4679769_10201_LINUX

p4679769_10201_Linux-x86-64

p4679769_10202_LINUX-zSer

发表评论

电子邮件地址不会被公开。