rac安装clusterware遇到:Failed to upgrade Oracle Cluster Registry configuration

在RAC安装中,有一步是要安装clusterware。当clusterware快要安装完的时候,会需要我们执行两个脚本,

关于rac安装执行脚本的含义,参考:http://blog.csdn.net/cymm_liu/article/details/11468657

当执行第二个脚本root.sh的时候报了如下错误:Failed to upgrade Oracle Cluster Registry configuration

rac安装clusterware遇到:Failed to upgrade Oracle Cluster Registry configuration_第1张图片

关于这个错误,很简单的理解,就是OCR磁盘不能配置,具体什么原因造成的呢?参考这篇文章:

参考文章:

http://blog.csdn.net/cymm_liu/article/details/11470153


好了看完了这篇文章,基本心理有底了,该如何解决了:

1、首先我测试了是不是bug引起的:

[root@rac2 bin]# ./clsfmt.bin ocr /dev/raw/raw1
clsfmt: Failure trying to resize OCR file from 205599744 bytes to 205602816 bytes
clsfmt: successfully initialized file /dev/raw/raw1

结果是,我的机器不存在这个bug。。


2、继续检查权限问题:

[root@rac2 bin]# ls -rlt /dev/raw
total 0
crw-rw---- 1 oracle oinstall 162, 7 Sep  8 19:07 raw7
crw-r--r-- 1 oracle oinstall 162, 3 Sep  8 19:07 raw3
crw-rw---- 1 oracle oinstall 162, 4 Sep  8 19:07 raw4
crw-r--r-- 1 oracle oinstall 162, 5 Sep  8 19:07 raw5
crw-r--r-- 1 oracle oinstall 162, 6 Sep  8 19:07 raw6
crw-r----- 1 root   oinstall 162, 2 Sep  8 20:54 raw2
crw-r----- 1 root   oinstall 162, 1 Sep  9 10:13 raw1

从输出结果看,也是没有问题的。


3、上面都没有问题,决定看看日志是怎么回事,因为之前我不知道有日志可以查,如果知道。第一步就应该去看日志:

[root@rac2 client]# pwd
/u01/app/oracle/product/10.2.0/crs/log/rac2/client

[root@rac2 client]# more ocrconfig_20694.log 
Oracle Database 10g CRS Release 10.2.0.1.0 Production Copyright 1996, 2005 Oracl
e.  All rights reserved.
2013-09-08 20:35:19.521: [ OCRCONF][3644192]ocrconfig starts...
2013-09-08 20:35:19.522: [ OCRCONF][3644192]Upgrading OCR data
2013-09-08 20:35:19.639: [ OCRCONF][3644192]OCR already in current version.
2013-09-08 20:35:19.661: [ OCRCONF][3644192]Failed to call clsssinit (21)
2013-09-08 20:35:19.662: [ OCRCONF][3644192]Failed to make a backup copy of OCR
2013-09-08 20:35:19.662: [ OCRCONF][3644192]Exiting [status=failed]...

通过查看日志,发现好像是因为我之前执行过root.sh,但是出现了错误,所以不能再执行了。。所以,我觉得清空一下裸设备:


检查裸设备I/O是否正常:

[root@rac1 rc.d]# hdparm -t /dev/raw/raw[1-5]

/dev/raw/raw1:
 Timing buffered disk reads:  196 MB in  0.60 seconds = 327.12 MB/sec


/dev/raw/raw2:
 Timing buffered disk reads:  196 MB in  0.14 seconds = 1446.42 MB/sec

/dev/raw/raw3:
 Timing buffered disk reads:  196 MB in  0.14 seconds = 1424.63 MB/sec

/dev/raw/raw4:
 Timing buffered disk reads:  read(2097152) returned 1024 bytes    ————这个是扩展分区,没有I/O,正常

/dev/raw/raw5:
 Timing buffered disk reads:  196 MB in  0.18 seconds = 1065.75 MB/sec
[root@rac1 rc.d]# 


把orc对应的裸设备清空下:

[root@rac1 client]# dd if=/dev/zero of=/dev/raw/raw1
dd: writing to `/dev/raw/raw1': No space left on device
401563+0 records in
401562+0 records out
205599744 bytes (206 MB) copied, 26.8478 seconds, 7.7 MB/s
[root@rac1 client]# dd if=/dev/zero of=/dev/raw/raw2
dd: writing to `/dev/raw/raw2': No space left on device
401626+0 records in
401625+0 records out
205632000 bytes (206 MB) copied, 27.7136 seconds, 7.4 MB/s


4、再次执行root.sh脚本,出现新的错误:

[root@rac1 crs]# ./root.sh 
WARNING: directory '/u01/app/oracle/product/10.2.0' is not owned by root
WARNING: directory '/u01/app/oracle/product' is not owned by root
WARNING: directory '/u01/app/oracle' 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
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory '/u01/app/oracle/product/10.2.0' is not owned by root
WARNING: directory '/u01/app/oracle/product' is not owned by root
WARNING: directory '/u01/app/oracle' is not owned by root
/u01/app/oracle/product/10.2.0/crs/bin/crsctl.bin: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
Failure initializing entries in /etc/oracle/scls_scr/rac1.
[root@rac1 crs]# ls


从这个错误看,是系统少了libstdc++.so.5这个库文件。这样的话,我从网上找对应的库文件,放到/usr/lib目录下,就能解决这个问题。

在下面包里有 libstdc++.so.5然后复制到/usr/lib

http://www.linuxidc.com/upload/2008_06/08062807082818.zip


5、再次清空ocr磁盘,执行root.sh:


[root@rac1 crs]# ./root.sh
WARNING: directory '/u01/app/oracle/product/10.2.0' is not owned by root
WARNING: directory '/u01/app/oracle/product' is not owned by root
WARNING: directory '/u01/app/oracle' 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
Oracle Cluster Registry configuration upgraded successfully         ——成功了
WARNING: directory '/u01/app/oracle/product/10.2.0' is not owned by root
WARNING: directory '/u01/app/oracle/product' is not owned by root
WARNING: directory '/u01/app/oracle' is not owned by root
assigning default hostname rac1 for node 1.
assigning default hostname rac2 for node 2.
Successfully accumulated necessary OCR keys.

Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node <nodenumber>: <nodename> <private interconnect name> <hostname>
node 1: rac1 rac1-priv rac1
node 2: rac2 rac2-priv rac2
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Now formatting voting device: /dev/raw/raw3
Now formatting voting device: /dev/raw/raw5
Now formatting voting device: /dev/raw/raw6
Format of 3 voting devices complete.
Startup will be queued to init within 90 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
        rac1
CSS is inactive on these nodes.
        rac2
Local node checking complete.
Run root.sh on remaining nodes to start CRS daemons.

[root@rac1 crs]# 

到此,rac1上执行root.sh脚本成功》。



















你可能感兴趣的:(rac安装clusterware遇到:Failed to upgrade Oracle Cluster Registry configuration)