RAC重用裸裝置

來源:互聯網
上載者:User

環境:

VBOX

Oracle ENTERPRISE LINUX 5.8_X86_64

ORACLE DATABASE 10.2.0.1.0

ORACLE CLUSTERWARE 10.2.0.1.0

在重新搭建一套RAC環境的時候,因為不想多建新的OCR/VOTING DISK共用磁碟,就打算使用上一套RAC環境中用過的共用磁碟。也考慮過,重用這些共用磁碟,可能會出一些狀況,打算嘗試一下,看看在哪些步驟上會出問題。

推薦閱讀:

裸裝置建立ASM磁碟

Oracle通過軟串連裸裝置建庫

AIX系統下增加Oracle temp 資料表空間 (裸裝置方式)
 
為了減少出錯幾率,在使用UDEV綁定裸裝置(共有5個裸裝置供OCR、VOTING DISK使用,OCR: /dev/raw/raw1-/dev/sdb1; /dev/raw/raw2-/dev/sdc1; VOTING DISK: /dev/raw/raw3-/dev/sdd1; /dev/raw/raw4-/dev/sde1; /dev/raw/raw5-/dev/sdf1)之前,把原分區sdb1, sdc1, sdd1, sde1, sdf1用fdisk刪除並重建了分區。
 
開始安裝CLUSTERWARE,安裝過程沒有問題,按照上面的分布方式把裸裝置分配給了OCR/VOTING DISK。

但是在第一個節點執行$ORA_CRS_HOME/root.sh時,報錯:

[root@rac5 rules.d]# /s01/app/oracle/product/10.2.0/crs_1/root.sh
WARNING: directory '/s01/app/oracle/product/10.2.0' is not owned by root
WARNING: directory '/s01/app/oracle/product' is not owned by root
WARNING: directory '/s01/app/oracle' is not owned by root
WARNING: directory '/s01/app' is not owned by root
WARNING: directory '/s01' 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
Failed to upgrade Oracle Cluster Registry configuration

同時發現:

[root@rac5 rules.d]# ll /dev/raw/
total 0
crw-r----- 1 root  oinstall 162, 1 Apr  7 08:12 raw1
crw-r----- 1 root  oinstall 162, 2 Apr  7 08:12 raw2
crw-r--r-- 1 oracle oinstall 162, 3 Apr  7 08:12 raw3
crw-r--r-- 1 oracle oinstall 162, 4 Apr  7 08:12 raw4
crw-r--r-- 1 oracle oinstall 162, 5 Apr  7 08:12 raw5

查看日誌:

/s01/app/oracle/product/10.2.0/crs_1/log/rac5/client/ocrconfig_6661.log

Oracle Database 10g CRS Release 10.2.0.1.0 Production Copyright 1996, 2005 Oracle.  All rights reserved.
2014-04-07 08:12:14.376: [ OCRCONF][1305384672]ocrconfig starts...
2014-04-07 08:12:14.376: [ OCRCONF][1305384672]Upgrading OCR data
2014-04-07 08:12:14.390: [ OCRCONF][1305384672]OCR already in current version.
2014-04-07 08:12:14.406: [ OCRCONF][1305384672]Failed to call clsssinit (21)
2014-04-07 08:12:14.406: [ OCRCONF][1305384672]Failed to make a backup copy of OCR
2014-04-07 08:12:14.406: [ OCRCONF][1305384672]Exiting [status=failed]...

 

果然,“不負我望”,還是出問題了,看來用fdisk不解決問題啊!

查了一番文章,採用了如下方式:

[root@rac5 rules.d]# dd if=/dev/zero of=/dev/sdb1
dd: writing to `/dev/sdb1': No space left on device
1044163+0 records in
1044162+0 records out
534610944 bytes (535 MB) copied, 76.6793 seconds, 7.0 MB/s
[root@rac5 rules.d]# dd if=/dev/zero of=/dev/sdc1
dd: writing to `/dev/sdc1': No space left on device
1044163+0 records in
1044162+0 records out
534610944 bytes (535 MB) copied, 74.1222 seconds, 7.2 MB/s
[root@rac5 rules.d]# dd if=/dev/zero of=/dev/sdd1
dd: writing to `/dev/sdd1': No space left on device
1044163+0 records in
1044162+0 records out
534610944 bytes (535 MB) copied, 76.5027 seconds, 7.0 MB/s
[root@rac5 rules.d]# dd if=/dev/zero of=/dev/sde1
dd: writing to `/dev/sde1': No space left on device
1044163+0 records in
1044162+0 records out
534610944 bytes (535 MB) copied, 75.4561 seconds, 7.1 MB/s
[root@rac5 rules.d]# dd if=/dev/zero of=/dev/sdf1
dd: writing to `/dev/sdf1': No space left on device
1044163+0 records in
1044162+0 records out
534610944 bytes (535 MB) copied, 74.4116 seconds, 7.2 MB/s

然後重新執行root.sh,就成功了!其實我對dd也不熟悉,查了一下說法:/dev/zero檔案代表一個永遠輸出 0的裝置檔案,使用它作輸入可以得到全為空白的檔案。
 
好吧,就是把之前被用過的幾個裸裝置變成徹底空白。就可以重新使用了。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.