DBCA建库找不到ASM磁盘一例

  • 环境信息 
    red hat linux64 
    gi 11.2.0.4 
    oracle 11.2.0.4
  • 问题现象 
    安装完gi软件及oralce database软件之后,通过dbca用户界面建立数据库,发现在node1上数据库能正常建立,在node2上不能正常建立数据库,dbca建库过程在node2上报错 
    如图: 
    这里写图片描述

  • 查看node1和node2上磁盘组状态

node1:
su - grid
SQL> select name,state from v$asm_diskgroup;

NAME                           STATE
------------------------------ -----------
SYSDG                          MOUNTED
DATADG                         MOUNTED
node2:
SQL> select name,state from v$asm_diskgroup;

NAME                           STATE
------------------------------ -----------
SYSDG                          MOUNTED
DATADG                         MOUNTED
通过asmcmd命令查看,能正常看到asm磁盘组里面的文件 
 
 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 通过截图报错查看dbca日志和所示的oraagent_oracle.log 
    dbca日志 
    /app/oracle/cfgtoollogs/dbca/RAC 
    /app/grid/11.2.0/log/rac2/agent/crsd/oraagent_oracle
[Thread-200] [ 2016-09-07 16:29:32.180 CST ] [DatabaseImpl.crsResource:3608]  calling parent's crsResource
[Thread-200] [ 2016-09-07 16:29:32.931 CST ] [PostDBCreationStep.executeImpl:885]  Starting Database HA Resource
[Thread-200] [ 2016-09-07 16:30:24.426 CST ] [CRSNative.internalStartResource:389]  Failed to start resource: Name: ora.rac.db, node: null, filter: null, msg CRS-5017: The resource action "ora.rac.db start" encountered the following error:
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATADG/RAC/spfileRAC.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATADG/RAC/spfileRAC.ora
ORA-01034: ORACLE not available
ORA-27123: unable to attach to shared memory segment
Linux-x86_64 Error: 13: Permission denied
Additional information: 26
Additional information: 196613
. For details refer to "(:CLSN00107:)" in "/app/grid/11.2.0/log/rac2/agent/crsd/oraagent_oracle/oraagent_oracle.log".

CRS-2674: Start of 'ora.rac.db' on 'rac2' failed
CRS-2632: There are no more servers to try to place resource 'ora.rac.db' on that would satisfy its placement policy
[Thread-200] [ 2016-09-07 16:30:24.427 CST ] [PostDBCreationStep.executeImpl:893]  Exception while Starting with HA Database Resource PRCR-1079 : Failed to start resource ora.rac.db
CRS-5017: The resource action "ora.rac.db start" encountered the following error:
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATADG/RAC/spfileRAC.ora'   提示无法访问spfile文件
ORA-17503: ksfdopn:2 Failed to open file +DATADG/RAC/spfileRAC.ora
ORA-01034: ORACLE not available
ORA-27123: unable to attach to shared memory segment
Linux-x86_64 Error: 13: Permission denied
Additional information: 26
Additional information: 196613
. For details refer to "(:CLSN00107:)" in "/app/grid/11.2.0/log/rac2/agent/crsd/oraagent_oracle/oraagent_oracle.log".

CRS-2674: Start of 'ora.rac.db' on 'rac2' failed
 
 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28

日志提示无法访问spfile文件,但是能通过grid用户在磁盘组里发现这些文件,诡异。 
那么思考原因: 
dbca建立数据库是oracle用户操作,而grid用户是管理磁盘组的,明显现象是,在节点2上oracle用户无法读取或访问asm磁盘组的文件,所以才可能出现此问题

  • 进一步验证此想法 
    在node2上尝试dbca建立数据库,发现选择数据文件存放路径时,找不到asm磁盘组+DATADG 
    这里写图片描述

  • 至此,问题明确,oracle无法发现asm磁盘组 
    查看两节点的oracle用户权限:

node1 :
id oracle
uid=501(oracle) gid=5001(oinstall) 组=5001(oinstall),5002(dba),5003(oper),5006(asmdba)
node2:
uid=501(oracle) gid=5001(oinstall) 组=5001(oinstall),5002(dba),5003(oper),5006(asmdba)
 
 
  • 1
  • 2
  • 3
  • 4
  • 5

查看GRID_HOME和ORACLE_HOME的bin目录下oracle文件的权限:

node1:
cd $GRID_HOME/bin
ls -l oracle
-rwsr-s--x 1 grid oinstall 209914519 97 14:40 oracle   文件权限正确
node2:
ls -lrt oralce
-rwxr-x--x 1 grid oinstall 209914519 97 14:42 oracle   文件权限错误
oracle用户:
cd $ORACLE_HOME/bin
ls -l oracle
node1:
-rwsr-s--x 1 oracle asmadmin 239626689 97 15:56 oracle  正确
node2:
-rwsr-s--x 1 oracle asmadmin 239626689 97 16:04 oracle  正确
 
 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

问题明确: 
在node2的,GRID_HOME/bin目录下,oracle文件权限错误 
修改: 
chmod +s oracle 
重新回到DBCA建库界面继续执行,则会成功发现ASM磁盘组,并成功建库。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值