no read quorum in group: required 1, found 0 disks & ORA-15063 ORA-15017 ORA-15032

如果你在使用ASM时遇到ASM Diskgroup无法MOUNT且ASM实例的alert.log中出现以下错误的话:

ERROR: no read quorum in group: required 1, found 0 disks

ORA-15032: not all alterations performed
ORA-15017: diskgroup “TESTDG04” cannot be mounted
ORA-15063: ASM discovered an insufficient number of disks for diskgroup “TESTDG04”
ERROR: /* ASMCMD */ALTER DISKGROUP testdg04 MOUNT

那么可能说明该ASM Diskgroup上的部分Metadata元数据已经存在逻辑损坏/不一致了,对于这种场景可以尝试先用kfed repair来修复  (10.2.0.5版本以后)

但如果kfed repair无法搞定的话,那么一般需要对ASM底层结构十分熟悉的专业技术人员来手工修复逻辑损坏了

 

 

ASMCMD> mount testdg04
ORA-15032: not all alterations performed
ORA-15017: diskgroup "TESTDG04" cannot be mounted
ORA-15063: ASM discovered an insufficient number of disks for diskgroup "TESTDG04" (DBD ERROR: OCIStmtExecute)
SQL> /* ASMCMD */ALTER DISKGROUP testdg04 MOUNT
NOTE: cache registered group TESTDG04 number=1 incarn=0x22485c89
NOTE: cache began mount (first) of group TESTDG04 number=1 incarn=0x22485c89
NOTE: Assigning number (1,0) to disk (/oracleasm/asm-disk01)
Fri Jan 30 02:33:05 2015
ERROR: no read quorum in group: required 1, found 0 disks
NOTE: cache dismounting (clean) group 1/0x22485C89 (TESTDG04)
NOTE: messaging CKPT to quiesce pins Unix process pid: 8724, image: oracle@mlab2.oracle.com (TNS V1-V3)
NOTE: dbwr not being msg'd to dismount
NOTE: lgwr not being msg'd to dismount
NOTE: cache dismounted group 1/0x22485C89 (TESTDG04)
NOTE: cache ending mount (fail) of group TESTDG04 number=1 incarn=0x22485c89
NOTE: cache deleting context for group TESTDG04 1/0x22485c89
GMON dismounting group 1 at 139 for pid 20, osid 8724
NOTE: Disk  in mode 0x8 marked for de-assignment
ERROR: diskgroup TESTDG04 was not mounted
ORA-15032: not all alterations performed
ORA-15017: diskgroup "TESTDG04" cannot be mounted
ORA-15063: ASM discovered an insufficient number of disks for diskgroup "TESTDG04"
ERROR: /* ASMCMD */ALTER DISKGROUP testdg04 MOUNT
Fri Jan 30 02:33:05 2015
NOTE: No asm libraries found in the system
SQL> create diskgroup testdg04 external redundancy disk '/oracleasm/asm-disk01';
Diskgroup created.
[oracle@mlab2 ~]$ kfed read /oracleasm/asm-disk01 aun=1 blkn=0|less
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                           17 ; 0x002: KFBTYP_PST_META
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                     256 ; 0x004: blk=256
kfbh.block.obj:              2147483648 ; 0x008: disk=0
kfbh.check:                  4150372545 ; 0x00c: 0xf761a8c1
kfbh.fcn.base:                        0 ; 0x010: 0x00000000
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kfdpHdrBv0.time.hi:            33015746 ; 0x000: HOUR=0x2 DAYS=0x1e MNTH=0x1 YEAR=0x7df
kfdpHdrBv0.time.lo:          2005330944 ; 0x004: USEC=0x0 MSEC=0x1bb SECS=0x38 MINS=0x1d
kfdpHdrBv0.last:                      2 ; 0x008: 0x00000002
kfdpHdrBv0.next:                      2 ; 0x00c: 0x00000002
kfdpHdrBv0.copyCnt:                   1 ; 0x010: 0x01
kfdpHdrBv0.version:                   0 ; 0x011: 0x00
kfdpHdrBv0.ub2spare:                  0 ; 0x012: 0x0000
kfdpHdrBv0.incarn:                    1 ; 0x014: 0x00000001
kfdpHdrBv0.copy[0]:                   0 ; 0x018: 0x0000
kfdpHdrBv0.copy[1]:                   0 ; 0x01a: 0x0000
kfdpHdrBv0.copy[2]:                   0 ; 0x01c: 0x0000
kfdpHdrBv0.copy[3]:                   0 ; 0x01e: 0x0000
kfdpHdrBv0.copy[4]:                   0 ; 0x020: 0x0000
kfdpHdrBv0.dtaSz:                     1 ; 0x022: 0x0001
ub1[0]:                               2 ; 0x024: 0x02
ub1[1]:                               0 ; 0x025: 0x00
ub1[2]:                               0 ; 0x026: 0x00
ub1[3]:                               0 ; 0x027: 0x00
ub1[4]:                               0 ; 0x028: 0x00
ub1[5]:                               0 ; 0x029: 0x00
ub1[6]:                               0 ; 0x02a: 0x00
ub1[7]:                               0 ; 0x02b: 0x00
ub1[8]:                               0 ; 0x02c: 0x00
ub1[9]:                               0 ; 0x02d: 0x00

如果自己搞不定可以找诗檀软件专业ORACLE数据库修复团队成员帮您恢复!

诗檀软件专业数据库修复团队

服务热线 : 13764045638   QQ号:47079569    邮箱:service@parnassusdata.com

 

ORACLE PRM是诗檀软件独立研发的ORACLE数据库灾难恢复软件,其具有全程图形化界面、简单高效等特点。

欢迎下载使用ORACLE PRM。 下载地址:http://parnassusdata.com/sites/default/files/ParnassusData_PRMForOracle_3206.zip

PRM 用户使用手册。http://www.parnassusdata.com/sites/default/files /ParnassusData%20Recovery%20Manager%20For%20Oracle%20Database%E7%94%A8%E6%88%B7%E6%89%8B%E5%86%8C%20v0.3.pdf

[oracle@mlab2 trace]$ oerr ora 15063
15063, 00000, “ASM discovered an insufficient number of disks for diskgroup \”%s\””
// *Cause:  ASM was unable to find a sufficient number of disks belonging to the
//          diskgroup to continue the operation.
// *Action: Check that the disks in the diskgroup are present and functioning,
//          that the owner of the ORACLE binary has read/write permission to
//          the disks, and that the ASM_DISKSTRING initialization parameter
//          has been set correctly.  Verify that ASM discovers the appropriate
//          disks by querying V$ASM_DISK from the ASM instance.
//
[oracle@mlab2 trace]$ oerr ora 15017
15017, 00000, “diskgroup \”%s\” cannot be mounted”
// *Cause:  The disk group could not be mounted by the ASM instance either
//          of an IO error or due to other reasons explained in alert log or
//          trace files.
// *Action: Check for additional errors reported. Correct the error and
//          retry the operation.
//
[oracle@mlab2 trace]$ oerr ora 15032
15032, 00000, “not all alterations performed”
// *Cause:  At least one ALTER DISKGROUP action failed.
// *Action: Check the other messages issued along with this summary error.
//

【ASM数据恢复】如何修复ASM Disk header_status=FORMER的磁盘重新加入Diskgroup ORA-15017 ORA-15063 ORA-15032

存在以下这种情况, 由于误DROP DISKGROUP或者误将DISK DROP 出原Diskgroup,或者因为Bug 13331814: ASM DISKS TURNED INTO FORMER WHILE DISKGROUP IS MOUNTED, 导致ASM DISK的header_status=FORMER,而非正常的MEMBER状态。

 

如果自己搞不定可以找诗檀软件专业ORACLE数据库修复团队成员帮您恢复!

诗檀软件专业数据库修复团队

服务热线 : 13764045638   QQ号:47079569    邮箱:service@parnassusdata.com

 

举例来说如下面的例子

 

 

[oracle@mlab2 ~]$ sqlplus  / as sysasm
SQL*Plus: Release 11.2.0.3.0 Production on Tue Nov 19 21:55:09 2013
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Automatic Storage Management option
SQL>  create diskgroup maclean external redundancy disk '/dev/asm-disk9';
Diskgroup created.
SQL> select group_number,name,state from v$asm_diskgroup;
GROUP_NUMBER NAME                           STATE
------------ ------------------------------ -----------
1 DATA                           MOUNTED
2 MACLEAN                        MOUNTED
SQL> col path for a40
SQL> select name,path,header_status from v$asm_disk where group_number=2;
NAME                           PATH
------------------------------ ----------------------------------------
HEADER_STATU
------------
MACLEAN_0000                   /dev/asm-disk9
MEMBER

 

 

这里我们将diskgroup drop一次:

 

 

SQL> drop diskgroup maclean;
Diskgroup dropped.
SQL> alter diskgroup maclean mount;
alter diskgroup maclean mount
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15017: diskgroup "MACLEAN" cannot be mounted
ORA-15063: ASM discovered an insufficient number of disks for diskgroup
"MACLEAN"
SQL> select name,path,header_status from v$asm_disk where path='/dev/asm-disk9';
NAME                           PATH
------------------------------ ----------------------------------------
HEADER_STATU
------------
                               /dev/asm-disk9
FORMER

 

 

 

使用kfed查看 ASM disk header metadata

 

 

[oracle@mlab2 ~]$ kfed read /dev/asm-disk9 |head -25
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                            1 ; 0x002: KFBTYP_DISKHEAD
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                       0 ; 0x004: blk=0
kfbh.block.obj:              2147483648 ; 0x008: disk=0
kfbh.check:                   554377417 ; 0x00c: 0x210b20c9
kfbh.fcn.base:                        0 ; 0x010: 0x00000000
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kfdhdb.driver.provstr:      ORCLDISK ; 0x000: length=11
kfdhdb.driver.reserved[0]:        65796 ; 0x008: 0x00010104
kfdhdb.driver.reserved[1]:            1 ; 0x00c: 0x00000001
kfdhdb.driver.reserved[2]:      4206569 ; 0x010: 0x00402fe9
kfdhdb.driver.reserved[3]:      3367865 ; 0x014: 0x003363b9
kfdhdb.driver.reserved[4]:    196018176 ; 0x018: 0x0baf0000
kfdhdb.driver.reserved[5]:    390595073 ; 0x01c: 0x17480201
kfdhdb.compat:                168820736 ; 0x020: 0x0a100000
kfdhdb.dsknum:                        0 ; 0x024: 0x0000
kfdhdb.grptyp:                        1 ; 0x026: KFDGTP_EXTERNAL
kfdhdb.hdrsts:                        4 ; 0x027: KFDHDR_FORMER
kfdhdb.dskname:            MACLEAN_0000 ; 0x028: length=12
kfdhdb.grpname:                 MACLEAN ; 0x048: length=7
kfdhdb.fgname:             MACLEAN_0000 ; 0x068: length=12

 

 

 

这里的kfdhdb.hdrsts: 4 ; 0x027: KFDHDR_FORMER 说明了该DISK的状态为FORMER

 

 

首先备份对应 ASM DISK的header

 

[oracle@mlab2 ~]$ mkdir /tmp/asm
[oracle@mlab2 ~]$ dd if=/dev/asm-disk9 of=/tmp/asm/asm-disk9-header bs=1024k count=20
[oracle@mlab2 ~]$ kfed read /dev/asm-disk9 > /tmp/asm/asm-disk9-meta
[oracle@mlab2 ~]$ ls -l /tmp/asm/asm-disk9-meta
-rw-r--r-- 1 oracle oinstall 6597 Nov 20 01:26 /tmp/asm/asm-disk9-meta
修改asm-disk9-meta这个文本中的内容
kfdhdb.hdrsts: 4 ; 0x027: KFDHDR_FORMER
修改为
kfdhdb.hdrsts: 3 ; 0x027: KFDHDR_MEMBER

 

 

 

如下面2图所示的变更:

 

hdrsts

 

 

 

 

 

 

 

 

 

 

 

hdrsts2

 

 

之后可以使用修改好的元数据信息文本来patch ASM DISK了,具体命令如下:

 

 

[oracle@mlab2 ~]$ kfed merge /dev/asm-disk9 text=/tmp/asm/asm-disk9-meta
再次确认 
[oracle@mlab2 ~]$ kfed read /dev/asm-disk9 |grep hdrsts
kfdhdb.hdrsts:                        3 ; 0x027: KFDHDR_MEMBER

 

 

最后尝试MOUNT该DISK对应的DISKGROUP:

 

SQL> alter diskgroup maclean mount;
Diskgroup altered.
SQL> select name,state from v$asm_diskgroup;
NAME                           STATE
------------------------------ -----------
DATA                           MOUNTED
MACLEAN                        MOUNTED

沪ICP备14014813号

沪公网安备 31010802001379号