Oracle 11gR2 RAC DBCA无法识别ASM磁盘组故障处理

OS:RHEL 6.5
DB:11.20.4
最近在安装一套Oracle 11G R2的RAC,前期都很顺利,到了DBCA这一步,选择磁盘组的时候怎么也选不到,如果手工输入ASM磁盘组的名称还会出现下面的提示:



看了asm是启动的,集群状态也是正常的,下面是集群状态:
[root@oranode1 ~]#crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.CRS_DG.dg  ora....up.type ONLINE    ONLINE    oranode1 
ora.DATA_DG.dg ora....up.type ONLINE    ONLINE    oranode1 
ora.FRA_DG.dg  ora....up.type ONLINE    ONLINE    oranode1 
。。。。。。
检查了oracle、grid用户的组权限、asm磁盘权限、HOME路径的设置都没发现问题。
最后在MOS上看到Doc ID 1269734.1 的文档,里面总结了很多可能导致这个问题的原因及解决办法。
最后发现了我的/u01目录的mount属性搞错了,多了nosuid的权限。
/dev/sda6 on /u01 type ext4 (rw,nosuid
最后修改fstab配置,重启服务器,重新DBCA成功。

总结:
这个DBCA识别不了ASM磁盘组主要有以下原因导致:
1、更改了GRID_HOME的权限。在完成grid的安装后会执行root.sh脚本,执行之后GRID_HOME的属主变为root。特别是GRID_HOME/bin/oracle的属性,如果发生改变可能导致磁盘识别不到。
2、磁盘头信息。如果安装过一次,但是由于遇到某些错误导致安装失败。然后删掉数据库重新安装,突然DiskGroups识别不到。这个时候就要考虑Format磁盘头部信息。
3、磁盘资源组没有正常启动。在ASMCA创建完DiskGroups之后,由于某种原因导致资源组没有正常启动。可以通过CRS_STAT查看。
4、磁盘权限。利用ASMLIB创建ASM磁盘,磁盘的属性都是root:disk。可以尝试更改属性为:grid:asmadmin或者grid:oinstall。
5、oracle文件的权限。正常的GRID_HOME/bin/oracle和ORACLE_HOME/bin/oracle两个文件的读写权限
正常权限为:-rwsr-s--x. 1 grid oinstall 209914471 Jul  3 16:58 oracle
6、GRID_HOME路径。正确的环境变量配置,可以查看/etc/oracle/olr.loc文件。

下面是Doc ID 1269734.1 的文档内容:


9876
Click to add to Favorites ASM Diskgroup Can Not Be Shown When Creating Database With DBCA (Doc ID 1269734.1) To BottomTo Bottom

In this Document

Symptoms
Changes
Cause
Solution
Scalability RAC Community


Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.1 to 11.2.0.2 [Release 11.2]
Oracle Database - Enterprise Edition - Version 12.1.0.2 to 12.1.0.2 [Release 12.1]
Generic UNIX
Generic Linux

Symptoms

The diskgroups can not be shown when ASM was selected to store the database during create database with dbca. The dbca trace file shows the following:

[AWT-EventQueue-0] [ 2010-11-22 19:11:51.333 CST ] [DiskGroupsPanel.initialize:221] Loading Data in the Table..
[AWT-EventQueue-0] [ 2010-11-22 19:11:51.334 CST ] [DiskGroupDataSource.loadData:308] Load the data from the datasource
[AWT-EventQueue-0] [ 2010-11-22 19:11:51.334 CST ] [ASMUtils.loadDiskGroups:633] sql to be executed:=select NAME||'|'||round(TOTAL_MB)||'|'||round(USABLE_FILE_MB)||'|'||nvl(TYPE, 'DBCA_NULL')||'|'||STATE from v$asm_diskgroup order by NAME using sqlengine <============== this is the query to get diskgroup informaiton.
[AWT-EventQueue-0] [ 2010-11-22 19:11:51.334 CST ] [OracleHome.getVersion:877] OracleHome.getVersion called. Current Version: null
[AWT-EventQueue-0] [ 2010-11-22 19:11:51.339 CST ] [InventoryUtil.getOUIInvSession:347] setting OUI READ level to ACCESSLEVEL_READ_LOCKLESS
[AWT-EventQueue-0] [ 2010-11-22 19:11:51.339 CST ] [OracleHome.getVersion:896] Homeinfo /app/11.2.0/grid,1
[AWT-EventQueue-0] [ 2010-11-22 19:11:51.339 CST ] [Version.isPre:274] version to be checked 11.2.0.1.0 major version to check against10
[AWT-EventQueue-0] [ 2010-11-22 19:11:51.339 CST ] [Version.isPre:285] isPre.java: Returning FALSE
[AWT-EventQueue-0] [ 2010-11-22 19:11:51.340 CST ] [OCR.loadLibrary:308]
......
[AWT-EventQueue-0] [ 2010-11-22 19:11:51.540 CST ] [SQLEngine.done:2148] Done called
[AWT-EventQueue-0] [ 2010-11-22 19:11:51.540 CST ] [ASMUtils.loadDiskGroups:713] ORA-01034: ORACLE not available <== error reported.

Changes

Fresh installation of 11.2 database using ASM.

Cause

The root cause can be anyone of the following:

1. Incorrect permission setting for oracle user
2. ASM instance was not started or diskgroups are not mounted.
3. The diskgroup resources are not online.
4. The permission setting for the asm devices are incorrect.
5. The oracle executable under /bin has incorrect permission settings.
6. the file system for grid home was mounted with option 'nosuid'.

7. incorrect crs_home setting in file olr.loc.

8. "DIAG_ADR_ENABLED" is set to OFF (non-default) but environment variable "ORA_CLIENTTRACE_DIR" is not set. This only apply to version 12c.

Solution

Make sure all the above factors are met:

1. Correct permission setting for oracle user
e.g:[root@db01 ~]# id oracle
uid=502(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),506(asmdba)<== the oracle user is a member of asmdba group

2. ASM instance has been started and diskgroups has been mounted.
e.g:SQL> select name,state,type from v$asm_diskgroup; <== the asm diskgroups have been mounted and the query on v$asm_diskgroup can return rows with grid user

NAME STATE TYPE
------------------------------ ----------- ------
OCR_VOTE MOUNTED NORMAL
ORADATA MOUNTED NORMAL
ORAFLASH MOUNTED NORMAL
......

3. The diskgroup resources are online.
e.g:[grid@db01 cfgtoollogs]$ crsctl stat resource -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
......
ora.OCR_VOTE.dg
ONLINE ONLINE db01
ONLINE ONLINE db02
ora.ORADATA.dg
ONLINE ONLINE db01
ONLINE ONLINE db02 <=== diskgroup resources are online.

4. The permission setting for the asm devices are correct.
[grid@db01 cfgtoollogs]$ ls -l /dev/oracleasm/disks
total 0
brw-rw---- 1 grid asmdba 8, 33 Nov 4 15:35 DATA
brw-rw---- 1 grid asmdba 8, 49 Nov 4 15:35 OCR_VOTE
brw-rw---- 1 grid asmdba 8, 17 Nov 4 15:35 RECO
......

5. Ownership and permission of the oracle executable under /bin are correct.
e.g: -rwsr-s--x 1 grid oinstall 152400480 Feb 3 2010 oracle

6. Do not mount grid home with option 'nosuid', because this will disable set-user-identifier or set-group-identifier bits and this is the way user 'oracle' access asm instance.
#mount -o nosuid,rw -t ext3 /dev/sdb1 /opt/grid

7. The ASM's owner has correct permission on GI_BASE and GI_HOME (ie,755)

e.g: drwxr-xr-x 8 grid oinstall 4096 Oct 10 01:42 /u01/app/grid

drwxr-xr-x 66 root oinstall 4096 Oct 3 09:40 /u01/app/11.2.0/grid

make sure the option of crs_home set to correct GI home in file olr.loc(e.g: /etc/oracle/olr.loc).

8.The fix is to either set sqlnet.ora parameter "DIAG_ADR_ENABLED" to ON (the default value), or set sqlnet.ora parameter "DIAG_ADR_ENABLED" to OFF and set environment variable "ORA_CLIENTTRACE_DIR" to a valid directory.






请使用浏览器的分享功能分享到微信等