近日處理一個Oracle Grid infrastructure(GI)安裝的問題,在執行root.sh過程中失敗,并顯示下面錯誤: DiskGroupOCRcreationfailedwiththefollowingmessage:ORA-15018:diskgroupcannotbecreatedORA-15031:diskspecification'/dev/vx/rdsk/dg_db01/lv_vote1'm
近日處理一個Oracle Grid infrastructure(GI)安裝的問題,在執行root.sh過程中失敗,并顯示下面錯誤:
Disk Group OCR creation failed with the following message: ORA-15018: diskgroup cannot be created ORA-15031: disk specification '/dev/vx/rdsk/dg_db01/lv_vote1' matches no disks <<<<<<<<<<<<<<< ORA-15031: disk specification '/dev/vx/rdsk/dg_db01/lv_vote2' matches no disks ORA-15031: disk specification '/dev/vx/rdsk/dg_db01/lv_vote3' matches no disks Configuration of ASM ... failed see asmca logs at /oracle/base/cfgtoollogs/asmca for details Did not succssfully configure and start ASM at /oracle/product/11.2.0.4/grid_1/crs/install/crsconfig_lib.pm line 6468. /oracle/product/11.2.0.4/grid_1/perl/bin/perl -I/oracle/product/11.2.0.4/grid_1/perl/lib -I/oracle/product/11.2.0.4/grid_1/crs/install /oracle/product/11.2.0.4/grid_1/crs/install/rootcrs.pl execution failed
錯誤ORA-15031的提示,還是很明顯的,無法識別對應的voting磁盤,正常解決思路,就是檢查磁盤是否正常掛載,權限是否正確等,需要逐項檢查。在Metalink上搜索,這個錯誤一般都是在node2上執行root.sh會遇到,而node1都是正常的。大多是權限以及系統層面掛載出現問題。但是我這個問題,是在node1上執行root.sh就失敗了。
開始各項分析檢查:
1. 檢查磁盤是否存在,權限是否正確,All Pass
#ls -lrt /dev/vx/rdsk/dg_db01 crw-rw---- 1 grid asmadmin 40,60000 Feb 12 10:51 lv_vote1 crw-rw---- 1 grid asmadmin 40,60001 Feb 12 10:52 lv_vote2 crw-rw---- 1 grid asmadmin 40,60002 Feb 12 10:52 lv_vote3
2. 檢查asm_diskstring設置
SQL> show parameter asm_diskstring NAME TYPE VALUE ------------------------------------ --------------------------------- ------------------------------ asm_diskstring string /dev/vx/rdsk/dg_db01
3. 并使用kfod來查看,是否能掃描到對應的磁盤,也正常
kfod asm_diskstring='/dev/vx/rdsk/dg_db01/lv_*' disks=all -------------------------------------------------------------------------------- Disk Size Path User Group ================================================================================ 1: 327680 Mb /dev/vx/rdsk/dg_db01/lv_data01 grid asmadmin 2: 327680 Mb /dev/vx/rdsk/dg_db01/lv_data02 grid asmadmin 3: 327680 Mb /dev/vx/rdsk/dg_db01/lv_data03 grid asmadmin 4: 112910 Mb /dev/vx/rdsk/dg_db01/lv_data04 grid asmadmin 5: 1024 Mb /dev/vx/rdsk/dg_db01/lv_vote1 grid asmadmin 6: 1024 Mb /dev/vx/rdsk/dg_db01/lv_vote2 grid asmadmin 7: 1024 Mb /dev/vx/rdsk/dg_db01/lv_vote3 grid asmadmin -------------------------------------------------------------------------------- ORACLE_SID ORACLE_HOME ================================================================================ +ASM1 /oracle/product/11.2.0.4/grid_1 grid@HAZZ-NRMS-RESDB01:/home/grid>
4. 至此,我懷疑是asm_diskstring設置的不夠準確,將其更改為
SQL> show parameter asm_diskstring NAME TYPE VALUE ------------------------------------ --------------------------------- ------------------------------ asm_diskstring string /dev/vx/rdsk/dg_db01/lv_*
但是問題依舊沒有解決,
5. 檢查集群安裝環境,也沒有發現問題
$ ./runcluvfy.sh stage -pre crsinst -n node1,node2 -verbose $ ./runcluvfy.sh comp ssa -n all -verbose
6. 操作系統日志,沒有發現錯誤
IBM: /bin/errpt -a > messages.out
至此,可以確認,根據oracle的安裝文檔,目前的磁盤權限完全符合安裝條件,在GI的圖形化安裝過程,也是可以看見ASM disk的,但是在root.sh執行過程中,就是無法通過。
后通過Metalink查詢到下面文章
ASM Is Not Detecting Raw Devices Or Regular Raw Devices On AIX (Doc ID 1174604.1)
根據文檔描述:
EMC存儲,使用多路徑,可能會遇到這個問題,而我的存儲確實使用的EMC和多路徑。
好吧,按照這個文檔的Solution,測試一下
Please attempt the next action plan on the mount point which contains the ASM Oracle Home: 1) Dismount the filesystem which contains the ASM Oracle Home. 2) Change the ownership of the mount point to oracle : dba 3) Remount the filesystem 4) The EMC PowerPath raw devices or regular raw devices are now being discovered.
我的執行步驟如下:
1、dismount /u01/oracle 2、chown -R oracle:oinstall /u01/oracle chmod 775 /u01/oracle 3、mount /u01/oracle 4、再次執行root.sh,成功
說真的,我很難理解,為什么mount路徑的權限,會影響到ASM disk的無法識別.
根據文檔1174604.1中提及的Bug 9976459 : ASM DISK NOT GETTING DISCOVERED,其中有這樣一段解釋
When a file system is mounted over a directory, the permissions of the root directory of the mounted file system takes precedence over the permissions of the mount point. A common problem is failure of the pwd command. Without search permission in the mounted-over directory, the pwd command returns the following message: pwd: Permission denied This problem can be avoided by always setting the permissions of the mounted-over directory to at least 111.
最終,根據上面的描述,google到了IBM的解釋:
http://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ibm.aix.osdevice/mountpoint.htm
安裝點
安裝點是一個目錄或文件,可在該處訪問新文件系統、目錄或文件。要安裝文件系統或目錄,安裝點必須為一個目錄;要安裝文件,那么安裝點必須為文件。
通常,文件系統、目錄或文件安裝在空安裝點上,但這不是必需的。如果作為安裝點的文件或目錄包含任何數據,那么另一個文件或目錄在該安裝點進行安裝時,該數據不可訪問。實際上,已安裝的文件或目錄覆蓋了以前在該目錄中的內容。一旦撤銷在初始目錄或文件上的安裝,該目錄或文件就重新可訪問。
在目錄上安裝文件系統時,已安裝文件系統的根目錄許可權優先于安裝點的許可權。有一個例外是安裝目錄中的 ..(點點)父目錄條目。為了操作系統能夠訪問新文件系統,安裝點父目錄信息必須可用。
例如,如果當前工作目錄是 /home/frank,那么命令 cd .. 將工作目錄更改至 /home。 如果 /home/frank 目錄是已安裝的文件系統的根,那么為了使 cd .. 命令成功,操作系統必須在 /home/frank 目錄中找到父目錄信息。
對于需要父目錄信息才能成功的任何命令,用戶必須具有在安裝目錄中的搜索許可權。授予對安裝目錄的搜索許可權失敗可能會導致不可預測的結果,尤其是因為安裝目錄許可權是不可見的。常見問題是 pwd 命令失敗。如果沒有對安裝目錄的搜索許可權,pwd 命令將返回此消息:
pwd:許可權被拒絕
通過始終將安裝目錄的許可權至少設置為 111 可避免此問題。
至此,問題已經解決,由于mount點的權限問題,會導致ASM disk識別的失敗。
哎!??!神奇的經歷!??!
聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com