案例:Oracle报错ASM磁盘组不存在或没有mount

环境:RHEL 6.5 + Oracle Standby RAC 11.2.0.4

我做Standby RAC实验时,在恢复控制文件时,报错无法在磁盘组创建文件,具体报错内容如下:

[oracle@jystdrac1 standby]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Wed Aug 9 22:35:41 2017

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: JYZHAO (not mounted)

RMAN> restore controlfile from '/public/hotback/jyzhao/standby/control_for_standby.ctl';

Starting restore at 09-AUG-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=34 instance=jyzhao1 device type=DISK channel ORA_DISK_1: restoring control file
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 08/09/2017 22:36:11
ORA-19870: error while restoring backup piece /public/hotback/jyzhao/standby/control_for_standby.ctl
ORA-19504: failed to create file "+DATA"
ORA-17502: ksfdcre:4 Failed to create file +DATA
ORA-15001: diskgroup "DATA" does not exist or is not mounted
ORA-15040: diskgroup is incomplete
ORA-15040: diskgroup is incomplete
ORA-15040: diskgroup is incomplete RMAN> exit

马上去查磁盘组是否正常mount,结果是正常的:

[root@jystdrac1 ~]# su - grid
[grid@jystdrac1 ~]$ asmcmd
ASMCMD> lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 4096 1048576 15360 15261 0 15261 0 N DATA/
MOUNTED EXTERN N 512 4096 1048576 5120 5025 0 5025 0 N FRA/
MOUNTED NORMAL N 512 4096 1048576 3072 2146 1024 561 0 Y OCR/
ASMCMD>

去看数据库的alert日志:

Wed Aug 09 22:29:50 2017
NOTE: Loaded library: System
ORA-15025: could not open disk "/dev/asm-diske"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
ORA-15025: could not open disk "/dev/asm-diskf"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
ORA-15025: could not open disk "/dev/asm-diskg"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
Wed Aug 09 22:29:50 2017
SUCCESS: diskgroup DATA was dismounted
ERROR: diskgroup DATA was not mounted
ORA-15025: could not open disk "/dev/asm-diskh"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
SUCCESS: diskgroup FRA was dismounted
ERROR: diskgroup FRA was not mounted

居然说是无法打开asm磁盘,迅速去查asm磁盘情况:

[root@jystdrac1 ~]# ls -l /dev/asm*
brw-rw---- 1 grid asmadmin 8, 16 Aug 9 22:55 /dev/asm-diskb
brw-rw---- 1 grid asmadmin 8, 32 Aug 9 22:55 /dev/asm-diskc
brw-rw---- 1 grid asmadmin 8, 48 Aug 9 22:55 /dev/asm-diskd
brw-rw---- 1 grid asmadmin 8, 64 Aug 9 22:55 /dev/asm-diske
brw-rw---- 1 grid asmadmin 8, 80 Aug 9 22:11 /dev/asm-diskf
brw-rw---- 1 grid asmadmin 8, 96 Aug 9 22:11 /dev/asm-diskg
brw-rw---- 1 grid asmadmin 8, 112 Aug 9 22:55 /dev/asm-diskh /dev/asm:
total 0
[root@jystdrac1 ~]# id grid
uid=700(grid) gid=800(oinstall) groups=800(oinstall),700(asmadmin),701(asmdba),702(asmoper)
[root@jystdrac1 ~]# id oracle
uid=800(oracle) gid=800(oinstall) groups=800(oinstall),701(asmdba),801(dba),802(oper)

发现磁盘组权限没有问题,grid和oracle用户的组也都符合官方要求。

拿着alert日志的关键报错信息“ORA-15025 ORA-27041 Linux-x86_64 Error: 13: Permission denied”去查MOS:

找到一篇MOS匹配:Database Will Not Mount: ORA-15025, ORA-27041, 'Permission denied', ORA-15081 (文档 ID 1378747.1)

最终说是

CAUSE

However the problem is that the Database oracle executable is not assigned to the ASM OSASM group (instead is assigned to the 'oinstall' group):

-rwsr-s--x 1 oracle oinstall 210973186 May 31 21:25 /appl/oracle/OracleHomes/11.2.0/bin/oracle

It needs to be:

-rwsr-s--x 1 oracle asmadmin 210973186 May 31 21:25 /appl/oracle/OracleHomes/11.2.0/bin/oracle

按照MOS的说法,去查oracle用户的这个oracle二进制文件的属组,果然发现是oinstall:

[root@jystdrac1 ~]# su - oracle
[oracle@jystdrac1 ~]$ cd $ORACLE_HOME/bin/
[oracle@jystdrac1 bin]$ ls -l oracle
-rwsr-s--x 1 oracle oinstall 239626641 Aug 6 00:42 oracle

将其改为MOS说的asmadmin,

As the <asm_home sfw owner>:

$ cd <asm_home>/bin

$ ./setasmgidwrap o=<db_home>/bin/oracle

ON NODE1:
[root@jystdrac1 bin]# pwd
/opt/app/oracle/product/11.2.0/dbhome_1/bin
[root@jystdrac1 bin]# ls -l oracle
-rwsr-s--x 1 oracle oinstall 239626641 Aug 6 00:42 oracle
[grid@jystdrac1 bin]$ ./setasmgidwrap o=/opt/app/oracle/product/11.2.0/dbhome_1/bin/oracle
[root@jystdrac1 bin]# ls -l oracle
-rwsr-s--x 1 oracle asmadmin 239626641 Aug 6 00:42 oracle ON NODE2:
[root@jystdrac2 bin]# pwd
/opt/app/oracle/product/11.2.0/dbhome_1/bin
[root@jystdrac2 bin]# ls -l oracle
-rwsr-s--x 1 oracle oinstall 239626641 Aug 6 00:48 oracle
[root@jystdrac2 bin]# chown oracle:asmadmin oracle
[root@jystdrac2 bin]# ls -l oracle
-rwxr-x--x 1 oracle asmadmin 239626641 Aug 6 00:48 oracle
[root@jystdrac2 bin]# chmod 6751 oracle
[root@jystdrac2 bin]# ls -l oracle
-rwsr-s--x 1 oracle asmadmin 239626641 Aug 6 00:48 oracle

如上,两个节点都需要改正确,我这里特意演示了两种方法,在一节点使用MOS推荐的方法修改可以一次成功修改,且能保证不改错,只是等的时间长。在二节点直接通过操作系统命令修改,速度快,需要确认最终改对。

最后重启库再试恢复控制文件:

[oracle@jystdrac1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Aug 9 23:16:38 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup nomount pfile=$ORACLE_HOME/dbs/pfile_for_standby.txt
ORACLE instance started. Total System Global Area 534462464 bytes
Fixed Size 2254952 bytes
Variable Size 436209560 bytes
Database Buffers 92274688 bytes
Redo Buffers 3723264 bytes
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@jystdrac1 ~]$ rman target / Recovery Manager: Release 11.2.0.4.0 - Production on Wed Aug 9 23:18:28 2017 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: JYZHAO (not mounted) RMAN> restore controlfile from '/public/hotback/jyzhao/standby/control_for_standby.ctl'; Starting restore at 09-AUG-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=34 instance=jyzhao1 device type=DISK channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:16
output file name=+DATA/mynas/controlfile/current.256.951607115
output file name=+FRA/mynas/controlfile/current.256.951607123
Finished restore at 09-AUG-17 RMAN>

成功备份没有问题,alert也不再报错,其实之前在一些客户的生产环境,遇到一些类型的问题,也都和这二进制文件的权限相关,如此看来,掌握这个oracle二进制文件的权限的小知识点也很重要哦。

案例:Oracle报错ASM磁盘组不存在或没有mount的更多相关文章

  1. oracle 11g rac asm磁盘组增加硬盘

    要增加磁盘的磁盘组为:DATA 要增加的磁盘为: /dev/sde1 在第一个节点上:[root@rac1 ~]# fdisk /dev/sdeDevice contains neither a va ...

  2. ASM磁盘组空间不足--ORA-15041:DISGROUP DATA space exhausted (生产库案例)

    原创作品,出自 "深蓝的blog" 博客,深蓝的blog:http://blog.csdn.net/huangyanlong/article/details/47277715 近日 ...

  3. 基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:4.安装Oracle RAC FAQ-4.5.安装Grid,创建ASM磁盘组空间不足

    因之前分区时,分区的Last cylinder的值选了“1”,导致创建磁盘组空间不足.解决办法是先删除分区,重新创建分区并删除ASM磁盘,然后重建ASM磁盘 1. 先删除分区,重新创建分区: 1)查询 ...

  4. 转://Oracle 11gR2 ASM磁盘组管理

    一.环境.[grid@rhel2 ~]$ cat /etc/issueRed Hat Enterprise Linux Server release 5.5 (Tikanga) Kernel \r o ...

  5. 11G ORACLE RAC DBCA 无法识别asm磁盘组

    ASM磁盘无法识别几种现象: 1) gi家目录或者其子目录权限错误 2)asm磁盘的权限错误 3)asm实例未启动或者asm磁盘组没有mount上 4)asm磁盘组资源没有在线 5)oracle用户的 ...

  6. Oracle 11gR2 RAC DBCA无法识别ASM磁盘组(ORA-19504,ORA-15045,ORA-17502,ORA-15081)

    ORA-19504: failed to create file "+DATA" ORA-15045: ASM file name '+DATA' is not in refere ...

  7. Oracle RAC环境下ASM磁盘组扩容

    生产环境注意调整以下参数: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ...

  8. bay——Oracle RAC环境下ASM磁盘组扩容.docx

    https://www.cnblogs.com/polestar/p/10115263.html Oracle RAC环境下ASM磁盘组扩容 生产环境注意调整以下参数: +++++++++++++++ ...

  9. Oracle DBCA工具检测不到ASM磁盘组

    本例环境: 操作系统OEL 6.5 数据库版本:11.2.0.4 问题:DBCA建库的时候,检测不到ASM磁盘组 因素一:可能是在授权的时候执行了 chown –R 775 /u01/app等修改权限 ...

随机推荐

  1. Oracle数据库概念和一些基本的SQL语句

    1.数据 定义:描述事物的符号.例如:文本.音频.视频都是数据. 2.数据库 存放数据的仓库,存放在计算机中,按照一定格式存放,可以为用户共享. 3.数据库的发展阶段 1.网状数据库 2.层次数据库 ...

  2. Java 基础 程序流程控制 (下)

    Java 程序流程控制 (下) 此篇单独对循环结构的知识点进行整理: 之前讲到循环结构分为:for循环,while循环,do...while循环三种最基本的循环结构:在JDK1.5以后的版本还提供了f ...

  3. Unity应用架构设计(12)——AOP思想的实践

    想象一下,当程序所有的业务逻辑都完成的时候,你可能还来不及喘口气,紧张的测试即将来临.你的Boss告诉你,虽然程序没问题,但某些方法为什么执行这么慢,性能堪忧.领会了Boss的意图之后,漫长的排查问题 ...

  4. kotlin的一些特性介绍和与java C#的简单对比

    前言 这是我之前在知乎上的一些回答的汇总,感觉还是博客园写这些东西方便一点,也算是理下我的一些思路,现将文章整理后,发布在园子里. 为何是kotlin: 很多人对kt没有一个正确的定位,可能大家第一反 ...

  5. dynamic-load-apk 插件与宿主方法互调

    新建项目 DlPluginHost,下载dynamic-load-apk源码 1.将dynamic-load-apk 文件夹中的lib做为module导入到DlPlginHost 2.导入到Plugi ...

  6. Django 踩过的坑(一)

    平台:win10 工具:cmd python3 刚刚学习Django搭建环境,网站还木有发布,就直接来了个大麻烦. 一切按着<Django 学习笔记(二)>这篇文章来的,在最后cmd运行服 ...

  7. mybatis学习笔记(五) -- maven+spring+mybatis从零开始搭建整合详细过程(附demo和搭建过程遇到的问题解决方法)

    文章介绍结构一览 一.使用maven创建web项目 1.新建maven项目 2.修改jre版本 3.修改Project Facts,生成WebContent文件夾 4.将WebContent下的两个文 ...

  8. VB6之阴影图层

    要是能创建半透明的刷子就好了,就不必像这样以图层的方式实现透明阴影效果. 代码: 'code by lichmama@cnblogs.com '绘制阴影图层 Private Declare Funct ...

  9. 基本的传染病模型:SI、SIS、SIR及其Python代码实现

    本文主要参考博客:http://chengjunwang.com/en/2013/08/learn-basic-epidemic-models-with-python/.该博客有一些笔误,并且有些地方 ...

  10. "HK"日常之制作一只QQ刷屏

    刷屏器是什么?可以吃吗?如果可以吃它好吃吗? um. 刷屏器就是可以定时发生信息的东西 刷屏器可以应用于很多方面,例如别人不理你了或者在QQ斗图的时候.警告:本教程仅作为学习研究,禁止其他用途!--- ...