天天看點

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

在RAC安裝中,有一步是要安裝clusterware。當clusterware快要安裝完的時候,會需要我們執行兩個腳本,

當執行第二個腳本root.sh的時候報了如下錯誤:Failed to upgrade Oracle Cluster Registry configuration

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

關于這個錯誤,很簡單的了解,就是OCR磁盤不能配置,具體什麼原因造成的呢?參考這篇文章:

參考文章:

<a target="_blank" href="http://blog.csdn.net/cymm_liu/article/details/11470153">http://blog.csdn.net/cymm_liu/article/details/11470153</a>

好了看完了這篇文章,基本心理有底了,該如何解決了:

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

/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裡

<a target="_blank" href="http://www.linuxidc.com/upload/2008_06/08062807082818.zip">http://www.linuxidc.com/upload/2008_06/08062807082818.zip</a>

5、再次清空ocr磁盤,執行root.sh:

[root@rac1 crs]# ./root.sh

Oracle Cluster Registry configuration upgraded successfully         ——成功了

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 &lt;nodenumber&gt;: &lt;nodename&gt; &lt;private interconnect name&gt; &lt;hostname&gt;

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腳本成功》。