溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

當(dāng)root.sh與ORA-15031相遇

發(fā)布時(shí)間:2020-07-26 18:01:41 來(lái)源:網(wǎng)絡(luò) 閱讀:2508 作者:hsbxxl 欄目:關(guān)系型數(shù)據(jù)庫(kù)

      近日處理一個(gè)Oracle Grid infrastructure(GI)安裝的問(wèn)題,在執(zhí)行root.sh過(guò)程中失敗,并顯示下面錯(cuò)誤:

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

       錯(cuò)誤ORA-15031的提示,還是很明顯的,無(wú)法識(shí)別對(duì)應(yīng)的voting磁盤,正常解決思路,就是檢查磁盤是否正常掛載,權(quán)限是否正確等,需要逐項(xiàng)檢查。在Metalink上搜索,這個(gè)錯(cuò)誤一般都是在node2上執(zhí)行root.sh會(huì)遇到,而node1都是正常的。大多是權(quán)限以及系統(tǒng)層面掛載出現(xiàn)問(wèn)題。但是我這個(gè)問(wèn)題,是在node1上執(zhí)行root.sh就失敗了。

開始各項(xiàng)分析檢查:

1. 檢查磁盤是否存在,權(quán)限是否正確,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設(shè)置

SQL> show parameter asm_diskstring
NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
asm_diskstring                       string                            /dev/vx/rdsk/dg_db01

3. 并使用kfod來(lái)查看,是否能掃描到對(duì)應(yīng)的磁盤,也正常

 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設(shè)置的不夠準(zhǔn)確,將其更改為

SQL> show parameter asm_diskstring
NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
asm_diskstring                       string                            /dev/vx/rdsk/dg_db01/lv_*

但是問(wèn)題依舊沒有解決,

5. 檢查集群安裝環(huán)境,也沒有發(fā)現(xiàn)問(wèn)題

$ ./runcluvfy.sh stage -pre crsinst -n node1,node2 -verbose
$ ./runcluvfy.sh comp ssa -n all -verbose

6. 操作系統(tǒng)日志,沒有發(fā)現(xiàn)錯(cuò)誤

IBM: /bin/errpt -a > messages.out

       至此,可以確認(rèn),根據(jù)oracle的安裝文檔,目前的磁盤權(quán)限完全符合安裝條件,在GI的圖形化安裝過(guò)程,也是可以看見ASM disk的,但是在root.sh執(zhí)行過(guò)程中,就是無(wú)法通過(guò)。

       后通過(guò)Metalink查詢到下面文章
ASM Is Not Detecting Raw Devices Or Regular Raw Devices On AIX (Doc ID 1174604.1)

       根據(jù)文檔描述:
EMC存儲(chǔ),使用多路徑,可能會(huì)遇到這個(gè)問(wèn)題,而我的存儲(chǔ)確實(shí)使用的EMC和多路徑。


好吧,按照這個(gè)文檔的Solution,測(cè)試一下

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.

我的執(zhí)行步驟如下:

1、dismount /u01/oracle
2、chown -R oracle:oinstall /u01/oracle
   chmod 775 /u01/oracle
3、mount /u01/oracle
4、再次執(zhí)行root.sh,成功

       說(shuō)真的,我很難理解,為什么mount路徑的權(quán)限,會(huì)影響到ASM disk的無(wú)法識(shí)別.

        根據(jù)文檔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.

        最終,根據(jù)上面的描述,google到了IBM的解釋:
http://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ibm.aix.osdevice/mountpoint.htm

安裝點(diǎn)
        安裝點(diǎn)是一個(gè)目錄或文件,可在該處訪問(wèn)新文件系統(tǒng)、目錄或文件。要安裝文件系統(tǒng)或目錄,安裝點(diǎn)必須為一個(gè)目錄;要安裝文件,那么安裝點(diǎn)必須為文件。
       通常,文件系統(tǒng)、目錄或文件安裝在空安裝點(diǎn)上,但這不是必需的。如果作為安裝點(diǎn)的文件或目錄包含任何數(shù)據(jù),那么另一個(gè)文件或目錄在該安裝點(diǎn)進(jìn)行安裝時(shí),該數(shù)據(jù)不可訪問(wèn)。實(shí)際上,已安裝的文件或目錄覆蓋了以前在該目錄中的內(nèi)容。一旦撤銷在初始目錄或文件上的安裝,該目錄或文件就重新可訪問(wèn)。
       在目錄上安裝文件系統(tǒng)時(shí),已安裝文件系統(tǒng)的根目錄許可權(quán)優(yōu)先于安裝點(diǎn)的許可權(quán)。有一個(gè)例外是安裝目錄中的 ..(點(diǎn)點(diǎn))父目錄條目。為了操作系統(tǒng)能夠訪問(wèn)新文件系統(tǒng),安裝點(diǎn)父目錄信息必須可用。
      例如,如果當(dāng)前工作目錄是 /home/frank,那么命令 cd .. 將工作目錄更改至 /home。 如果 /home/frank 目錄是已安裝的文件系統(tǒng)的根,那么為了使 cd .. 命令成功,操作系統(tǒng)必須在 /home/frank 目錄中找到父目錄信息。
      對(duì)于需要父目錄信息才能成功的任何命令,用戶必須具有在安裝目錄中的搜索許可權(quán)。授予對(duì)安裝目錄的搜索許可權(quán)失敗可能會(huì)導(dǎo)致不可預(yù)測(cè)的結(jié)果,尤其是因?yàn)榘惭b目錄許可權(quán)是不可見的。常見問(wèn)題是 pwd 命令失敗。如果沒有對(duì)安裝目錄的搜索許可權(quán),pwd 命令將返回此消息:
pwd:許可權(quán)被拒絕
通過(guò)始終將安裝目錄的許可權(quán)至少設(shè)置為 111 可避免此問(wèn)題。


至此,問(wèn)題已經(jīng)解決,由于mount點(diǎn)的權(quán)限問(wèn)題,會(huì)導(dǎo)致ASM disk識(shí)別的失敗。
哎?。?!神奇的經(jīng)歷?。?!

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI