当root.sh与ORA-15031相遇

简介:

      近日处理一个Oracle Grid infrastructure(GI)安装的问题,在执行root.sh过程中失败,并显示下面错误:

1
2
3
4
5
6
7
8
9
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

1
2
3
4
#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设置

1
2
3
4
SQL> show parameter asm_diskstring
NAME                                  TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
asm_diskstring                       string                            /dev/vx/rdsk/dg_db01

3. 并使用kfod来查看,是否能扫描到对应的磁盘,也正常

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  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设置的不够准确,将其更改为

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

但是问题依旧没有解决,

5. 检查集群安装环境,也没有发现问题

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

6. 操作系统日志,没有发现错误

1
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,测试一下

1
2
3
4
5
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
2
3
4
5
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,其中有这样一段解释

1
2
3
4
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识别的失败。
哎!!!神奇的经历!!!










本文转自 hsbxxl 51CTO博客,原文链接:http://blog.51cto.com/hsbxxl/1614579,如需转载请自行联系原作者

目录
相关文章
|
JavaScript
【node错误】/usr/bin/env: node: No such file or directory
背景 安装了node后,执行npm run xxx的命令的时候,报错,提示如下: /usr/bin/env: node: No such file or directory   步骤 1.
6232 0
|
Shell 开发工具
chmod -rw /tmp/file1,编写脚本/root/bin/per.sh,判 断当前用户对/tmp/fiile1文件 是否不可读且不可写 ?
chmod -rw /tmp/file1,编写脚本/root/bin/per.sh,判 断当前用户对/tmp/fiile1文件 是否不可读且不可写 ?
50 1
|
Shell 开发工具
编写脚本/root/bin/backup.sh,可实现每日将/etc/目录 备份到/root/etcYYYY-mm-dd中
编写脚本/root/bin/backup.sh,可实现每日将/etc/目录 备份到/root/etcYYYY-mm-dd中
68 1
|
文字识别 Oracle 关系型数据库
Oracle rac重新执行root.sh脚本
Oracle rac重新执行root.sh脚本
826 0
|
Shell Linux
Rhel7安装RAC 11gR2时运行root.sh报错找不到ohas服务妙招
Rhel7安装RAC 11gR2时运行root.sh报错找不到ohas服务妙招
277 0
PROD_ROOT and PRD_ROOT
PROD_ROOT and PRD_ROOT
126 0
PROD_ROOT and PRD_ROOT
|
Oracle 关系型数据库 Linux
RHEL7.X安装12.2RAC时root.sh错误CLSRSC-400的解决方案
问题现象: [root@ora12c ghome]# /opt/oracle/ghome/root.sh Performing root user operation. The following environment variables are set as:     ORACLE_OWNER= grid     ORACLE_HOME=  /opt/oracle/ghome 。
7318 0