?
?????? 之前打算裝 Oracle 11gR2 的 RAC 的。 后來因?yàn)橘Y源不夠,就改裝 oracle 10g 了。 ?
?????? raw 是用 openfiler 配置 加 Multipath 多路徑配置的。
??????
?????? raw 的配置參考我的 Blog :
????????????? Linux 5.4 LVM RAW 設(shè)備 配置的深入研究
????????????? http://blog.csdn.net/tianlesoftware/archive/2010/11/26/6036263.aspx
?
這種情況下配置有些注意事項(xiàng)。 否則會(huì)在執(zhí)行 root.sh 命令的時(shí)候,報(bào)錯(cuò):
?
[root@rac1 init.d]# /u01/app/oracle/product/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
?
?
一般出現(xiàn)這個(gè)問題的原因有幾種:
?
( 1 ) Bug
?????? 這種情況參考:
?????? Executing root.sh errors with "Failed To Upgrade Oracle Cluster Registry Configuration" [ID 466673.1]
?????? http://blog.csdn.net/tianlesoftware/archive/2010/11/26/6037141.aspx
?
( 2 ) raw 設(shè)備的權(quán)限問題
????????????? [root@rac1 raw]# pwd
????????????? /dev/raw
????????????? [root@rac1 raw]# ll
????????????? total 0
????????????? crw-r----- 1 root ?? oinstall 162, 1 Nov 25 15:34 raw1
????????????? crw-r----- 1 root ?? oinstall 162, 2 Nov 25 15:34 raw2
????????????? crw-r--r-- 1 oracle oinstall 162, 3 Nov 25 13:48 raw3
????????????? crw-r--r-- 1 oracle oinstall 162, 4 Nov 25 13:48 raw4
????????????? crw-r--r-- 1 oracle oinstall 162, 5 Nov 25 13:48 raw5
??????
權(quán)限要設(shè)置成如下:
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 的規(guī)則里設(shè)置, 也可以把權(quán)限添加到 /etc/rc.d/rc.local ? 中。
?
( 3 ) raw 設(shè)備讀寫問題
?????? 這種情況參考:
?????? Placement of Voting disk and OCR Files in Oracle RAC 10g and 11gR1 [ID 293819.1] ?????????????
?????? http://blog.csdn.net/tianlesoftware/archive/2010/11/26/6037108.aspx
?
清空一下 RAW:
[root@rac1 raw]# dd if=/dev/zero of=/dev/mapper/crsp6 bs=1M count=200
dd: writing `/dev/mapper/crsp6': No space left on device
197+0 records in
196+0 records out
205599744 bytes (206 MB) copied, 21.1817 seconds, 9.7 MB/s
說明:
?????? 這里有個(gè)提示信息,磁盤空間不足 : No space left on device 。 這里的情況是, 我的每個(gè) raw 是 200M 。 但是實(shí)際容量并沒有這么多。 所以我清空寫 200M 的時(shí)候,會(huì)報(bào)空間不足。 這種情況會(huì)按照實(shí)際大小進(jìn)行清空。 從下面我們可以該 raw 設(shè)備實(shí)際大小是 197M 。
?
[root@rac1 raw]# dd if=/dev/zero of=/dev/mapper/crsp6 bs=1M count=190
190+0 records in
190+0 records out
199229440 bytes (199 MB) copied, 21.9521 seconds, 9.1 MB/s
[root@rac1 raw]# dd if=/dev/zero of=/dev/mapper/crsp5 bs=1M count=195
195+0 records in
195+0 records out
204472320 bytes (204 MB) copied, 22.0362 seconds, 9.3 MB/s
[root@rac1 raw]# dd if=/dev/zero of=/dev/mapper/crsp7 bs=1M count=195
195+0 records in
195+0 records out
204472320 bytes (204 MB) copied, 19.9692 seconds, 10.2 MB/s
[root@rac1 raw]# dd if=/dev/zero of=/dev/mapper/crsp8 bs=1M count=195
195+0 records in
195+0 records out
204472320 bytes (204 MB) copied, 18.5526 seconds, 11.0 MB/s
[root@rac1 raw]# dd if=/dev/zero of=/dev/mapper/crsp9 bs=1M count=195
195+0 records in
195+0 records out
204472320 bytes (204 MB) copied, 21.9439 seconds, 9.3 MB/s
?
?
?
我這次遇到問題的 Log 如下:
[root@rac1 client]# pwd
/u01/app/oracle/product/crs/log/rac1/client
[root@rac1 client]# ls
ocrconfig_7527.log
[root@rac1 client]# cat ocrconfig_7527.log
Oracle Database 10g CRS Release 10.2.0.1.0 Production Copyright 1996, 2005 Oracle. ? All rights reserved.
2010-11-25 19:54:14.694: [ OCRCONF][1189568]ocrconfig starts...
2010-11-25 19:54:14.696: [ OCRCONF][1189568]Upgrading OCR data
2010-11-25 19:54:15.434: [ ? OCRRAW][1189568]propriogid:1: INVALID FORMAT
2010-11-25 19:54:15.464: [ ? OCRRAW][1189568]propriogid:1: INVALID FORMAT
2010-11-25 19:54:15.464: [ ? OCRRAW][1189568]proprioini: both disks are not OCR formatted
2010-11-25 19:54:15.464: [ ? OCRRAW][1189568]proprinit: Could not open raw device
2010-11-25 19:54:15.465: [ default][1189568]a_init:7!: Backend init unsuccessful : [26]
2010-11-25 19:54:15.465: [ OCRCONF][1189568]Exporting OCR data to [OCRUPGRADEFILE]
2010-11-25 19:54:15.465: [ ? OCRAPI][1189568]a_init:7!: Backend init unsuccessful : [33]
2010-11-25 19:54:15.465: [ OCRCONF][1189568]There was no previous version of OCR. error:[PROC-33: Oracle Cluster Registry is not configured]
2010-11-25 19:54:16.072: [ ? OCRRAW][1189568]propriogid:1: INVALID FORMAT
2010-11-25 19:54:16.075: [ ? OCRRAW][1189568]propriogid:1: INVALID FORMAT
2010-11-25 19:54:16.075: [ ? OCRRAW][1189568]proprioini: both disks are not OCR formatted
2010-11-25 19:54:16.075: [ ? OCRRAW][1189568]proprinit: Could not open raw device
2010-11-25 19:54:16.076: [ default][1189568]a_init:7!: Backend init unsuccessful : [26]
2010-11-25 19:54:16.231: [ ? OCRRAW][1189568]propriogid:1: INVALID FORMAT
2010-11-25 19:54:16.232: [ ? OCRRAW][1189568]propriogid:1: INVALID FORMAT
2010-11-25 19:54:16.265: [ ? OCRRAW][1189568]ibctx:1:ERROR: INVALID FORMAT
2010-11-25 19:54:16.265: [ ? OCRRAW][1189568]proprinit:problem reading the bootblock or superbloc 22
?
2010-11-25 19:54:16.646: [ ? OCRRAW][1189568]propriogid:1: INVALID FORMAT
2010-11-25 19:54:16.647: [ ? OCRRAW][1189568]propriogid:1: INVALID FORMAT
2010-11-25 19:54:16.757: [ ? OCRRAW][1189568]propriowv: Vote information on disk 0 [/dev/raw/raw1] is adjusted from [0/0] to [1/2]
2010-11-25 19:54:16.762: [ ? OCRRAW][1189568]propriowv: Vote information on disk 1 [/dev/raw/raw2] is adjusted from [0/0] to [1/2]
2010-11-25 19:54:17.193: [ ? OCRRAW][1189568]propriniconfig:No 92 configuration
2010-11-25 19:54:17.193: [ ? OCRAPI][1189568]a_init:6a: Backend init successful
2010-11-25 19:54:18.263: [ OCRCONF][1189568]Initialized DATABASE keys in OCR
2010-11-25 19:54:18.478: [ OCRCONF][1189568]csetskgfrblock0: clsfmt returned with error [4].
2010-11-25 19:54:18.478: [ OCRCONF][1189568]Failure in setting block0 [-1]
2010-11-25 19:54:18.478: [ OCRCONF][1189568]OCR block 0 is not set !
2010-11-25 19:54:18.479: [ OCRCONF][1189568]Exiting [status=failed]...
?
?
這個(gè)是 Multipath 的 bug 問題,就是我們遇到的第一種情況:
?
( 1 ) 用 clsfmt 檢查 raw 設(shè)備
[root@rac1 bin]# ./clsfmt.bin ocr /dev/raw/raw1
clsfmt: Failure trying to resize OCR file from 205567488 bytes to 205570048 bytes
clsfmt: Received unexpected error 4 from skgfifi
skgfifi: Additional information: -2
Additional information: 205567488
?
這里沒有成功, 就是 bug 。
?
( 2 )用 Pathch 中的新文件替換 clsfmt.bin 文件。
?????? Patch 是: p4679769 。 這個(gè)需要 Oracle 帳號(hào)才能下載。 所以我將 Linux 平臺(tái)下 32 位和 64 位的 path 都上傳到 csdn 的下載里了。 有遇到相同問題的朋友自己去下載。 下載地址:
?????? http://download.csdn.net/source/2862150
?
?
?
( 3 )再次測(cè)試:
[root@rac1 bin]# ./clsfmt ocr /dev/raw/raw1
clsfmt: Failure trying to resize OCR file from 205567488 bytes to 205570048 bytes
clsfmt: successfully initialized file /dev/raw/raw1
[root@rac1 bin]# ./clsfmt ocr /dev/raw/raw2
clsfmt: Failure trying to resize OCR file from 205599744 bytes to 205602816 bytes
clsfmt: successfully initialized file /dev/raw/raw2
[root@rac1 bin]# ./clsfmt ocr /dev/raw/raw3
clsfmt: Failure trying to resize OCR file from 205599744 bytes to 205602816 bytes
clsfmt: successfully initialized file /dev/raw/raw3
[root@rac1 bin]# ./clsfmt ocr /dev/raw/raw4
clsfmt: Failure trying to resize OCR file from 205599744 bytes to 205602816 bytes
clsfmt: successfully initialized file /dev/raw/raw4
[root@rac1 bin]# ./clsfmt ocr /dev/raw/raw5
clsfmt: Failure trying to resize OCR file from 205599744 bytes to 205602816 bytes
clsfmt: successfully initialized file /dev/raw/raw5
?
?
bug 修復(fù)成功了。
?
( 4 ) 清空 raw 設(shè)備
?
因?yàn)槲覀円呀?jīng)執(zhí)行過 root.sh 命令,會(huì)有相關(guān)信息寫到 raw 設(shè)備里。 用 dd 命令清空這些信息。 最好留一點(diǎn)空間。 因?yàn)樵? Solaris 平臺(tái)上有預(yù)留 1M 空間的做法,不然會(huì)出現(xiàn)問題。
?
[root@rac1 rac1]# dd if=/dev/zero of=/dev/raw/raw1 bs=10M count=10
10+0 records in
10+0 records out
104857600 bytes (105 MB) copied, 17.4534 seconds, 6.0 MB/s
[root@rac1 rac1]# dd if=/dev/zero of=/dev/raw/raw2 bs=10M count=10
10+0 records in
10+0 records out
104857600 bytes (105 MB) copied, 11.4307 seconds, 9.2 MB/s
[root@rac1 rac1]# dd if=/dev/zero of=/dev/raw/raw3 bs=10M count=10
10+0 records in
10+0 records out
104857600 bytes (105 MB) copied, 18.4136 seconds, 5.7 MB/s
[root@rac1 rac1]# dd if=/dev/zero of=/dev/raw/raw4 bs=10M count=10
10+0 records in
10+0 records out
104857600 bytes (105 MB) copied, 17.821 seconds, 5.9 MB/s
[root@rac1 rac1]# dd if=/dev/zero of=/dev/raw/raw5 bs=10M count=10
10+0 records in
10+0 records out
104857600 bytes (105 MB) copied, 17.3289 seconds, 6.1 MB/s
?
?
如果不清空 raw 設(shè)備,直接執(zhí)行 root.sh 命令,還是會(huì)報(bào)錯(cuò)誤:
[root@rac1 bin]# /u01/app/oracle/product/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
?
錯(cuò)誤的 log 日志如下:
#cat /u01/app/oracle/product/crs/log/rac1/client/ocrconfig_16159.log
?
Oracle Database 10g CRS Release 10.2.0.1.0 Production Copyright 1996, 2005 Oracle. ? All rights reserved.
2010-11-25 23:27:25.468: [ OCRCONF][2118112]ocrconfig starts...
2010-11-25 23:27:25.469: [ OCRCONF][2118112]Upgrading OCR data
2010-11-25 23:27:25.558: [ ? OCRRAW][2118112]propriogid:1: INVALID FORMAT
2010-11-25 23:27:25.559: [ ? OCRRAW][2118112]proprioini: disk 0 (/dev/raw/raw1) doesn't have enough votes (1,2)
2010-11-25 23:27:25.559: [ ? OCRRAW][2118112]proprinit: Could not open raw device
2010-11-25 23:27:25.560: [ default][2118112]a_init:7!: Backend init unsuccessful : [26]
2010-11-25 23:27:25.560: [ OCRCONF][2118112]Exporting OCR data to [OCRUPGRADEFILE]
2010-11-25 23:27:25.560: [ ? OCRAPI][2118112]a_init:7!: Backend init unsuccessful : [33]
2010-11-25 23:27:25.560: [ OCRCONF][2118112]There was no previous version of OCR. error:[PROC-33: Oracle Cluster Registry is not configured]
2010-11-25 23:27:25.746: [ ? OCRRAW][2118112]propriogid:1: INVALID FORMAT
2010-11-25 23:27:25.746: [ ? OCRRAW][2118112]proprioini: disk 0 (/dev/raw/raw1) doesn't have enough votes (1,2)
2010-11-25 23:27:25.746: [ ? OCRRAW][2118112]proprinit: Could not open raw device
2010-11-25 23:27:25.747: [ default][2118112]a_init:7!: Backend init unsuccessful : [26]
2010-11-25 23:27:26.112: [ ? OCRRAW][2118112]propriogid:1: INVALID FORMAT
2010-11-25 23:27:26.112: [ ? OCRRAW][2118112]proprioini: disk 0 (/dev/raw/raw1) doesn't have enough votes (1,2)
2010-11-25 23:27:26.112: [ ? OCRRAW][2118112]proprinit: Could not open raw device
2010-11-25 23:27:26.120: [ ? OCRAPI][2118112]a_init:6b!: Backend init unsuccessful : [26]
2010-11-25 23:27:26.120: [ OCRCONF][2118112]Failed to initialized OCR context. error:[PROC-26: Error while accessing the physical storage]
2010-11-25 23:27:26.120: [ OCRCONF][2118112]Exiting [status=failed]...
?
?
( 5 )清空 raw 設(shè)備后,在執(zhí)行 /u01/app/oracle/product/crs/root.sh 命令
?????? 這次成功執(zhí)行。
?
?
?
?
?
?
------------------------------------------------------------------------------
Blog : http://blog.csdn.net/tianlesoftware
網(wǎng)上資源: http://tianlesoftware.download.csdn.net
相關(guān)視頻: http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx
DBA1 群: 62697716( 滿 ); DBA2 群: 62697977( 滿 )
DBA3 群: 62697850 ?? DBA 超級(jí)群: 63306533; ????
聊天 群: 40132017
-- 加群需要在備注說明 Oracle 表空間和數(shù)據(jù)文件的關(guān)系,否則拒絕申請(qǐng)
更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號(hào)聯(lián)系: 360901061
您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長(zhǎng)非常感激您!手機(jī)微信長(zhǎng)按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對(duì)您有幫助就好】元
