码迷,mamicode.com
首页 > 其他好文 > 详细

当root.sh与ORA-15031相遇

时间:2015-02-15 23:14:58      阅读:405      评论:0      收藏:0      [点我收藏+]

标签:root.sh   ora-15031   ora-15018   voting   

      近日处理一个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识别的失败。
哎!!!神奇的经历!!!

本文出自 “小小狗窝” 博客,请务必保留此出处http://hsbxxl.blog.51cto.com/181620/1614579

当root.sh与ORA-15031相遇

标签:root.sh   ora-15031   ora-15018   voting   

原文地址:http://hsbxxl.blog.51cto.com/181620/1614579

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!