【Oracle ASM数据恢复】V$ASM_DISK HEADER_STATUS显示为Provisioned的问题解析

当用户加载mount一个之前可用的diskgroup 时,将在ASM的告警日志中看到下面的错误:

 

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

 

SQL> ALTER DISKGROUP ALL MOUNT
Tue Jul 19 09:31:09 2005
Loaded ASM Library - Generic Linux, version 1.0.0 library for asmlib interface
Tue Jul 19 09:31:09 2005
NOTE: cache registered group DBFILE_GRP number=1 incarn=0xc3fd9b7d
NOTE: cache registered group FLASHBACK_GRP number=2 incarn=0xc40d9b7e
NOTE: cache dismounting group 1/0xC3FD9B7D (DBFILE_GRP)
NOTE: dbwr not being msg'd to dismount
ERROR: diskgroup DBFILE_GRP was not mounted
NOTE: cache dismounting group 2/0xC40D9B7E (FLASHBACK_GRP)
NOTE: dbwr not being msg'd to dismount
ERROR: diskgroup FLASHBACK_GRP was not mounted

[oracle@vrh8 ~]$ 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.
//
[oracle@vrh8 ~]$ 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.
//

 

 

 

主要是出现三个错误:
ORA-15032: not all alterations performed
ORA-15063: diskgroup “FLASHBACK_GRP” lacks quorum of 2 PST disks; 0 found
ORA-15063: diskgroup “DBFILE_GRP” lacks quorum of 2 PST disks; 0 found

 

 

检查V$ASM_DISK 的HEADER_STATUS 显示为PROVISIONED,甚至当这个disk没有被asmlib label过:

 

 

SQL> select path, MOUNT_STATUS, HEADER_STATUS, MODE_STATUS, STATE from v$asm_disk;
PATH MOUNT_S HEADER_STATUS MODE_ST STATE
------------- ------- ------------- ------- --------
/dev/raw/raw1 CLOSED PROVISIONED ONLINE NORMAL

 

 

 

导致该问题的原因一般是硬件故障,或者由于存储的固件升级

 

使用kfed来检查disk header:

kfed read /dev/raw/raw1
kfbh.type: 1 ; 0x002: KFBTYP_DISKHEAD
kfdhdb.driver.provstr: ORCLDISKASM1 ; 0x000: length=12
kfdhdb.grptyp: 1 ; 0x026: KFDGTP_EXTERNAL
kfdhdb.hdrsts: 3 ; 0x027: KFDHDR_MEMBER
kfdhdb.dskname: ASM1 ; 0x028: length=4
kfdhdb.grpname: DBFILE_GRP ; 0x048: length=10
kfdhdb.fgname: ASM1 ; 0x068: length=4
kfdhdb.capname: ; 0x088: length=0
kfdhdb.dskname: ASM1 ; 0x028: length=4
kfdhdb.grpname: DBFILE_GRP ; 0x048: length=10
kfdhdb.fgname: ASM1 ; 0x068: length=4
kfdhdb.capname: ; 0x088: length=0

 

 

观察kfdhdb.hdrsts: 3 ; 0x027: KFDHDR_MEMBER,  KFDHDR_MEMBER说明其header状态实际是MEMBER,而V$ASM_DISK.HEADER_STATUS 则显示为PROVISIONED,2者并不匹配。

 

在disk header中kfdhdb.hdrsts 标记了本disk的状态, 下表显示了几个状态的描述:

 

kfdhdb.hdrsts 描述
MEMBER 属于当前diskgroup的disk
FORMER 这个disk以前属于一个diskgroup,现在这个diskgroup被删除了
CANDIDATE 当使用裸设备,一个新的可以被diskgroup所用的disk
PROVISIONED 当使用asmlib,一个新的可以被diskgroup所用的disk

 

 

如果kfed  read发现其状态为0x027: KFDHDR_MEMBER,则V$ASM_DISK不应当显示PROVISIONED。

我们发现当checksum不正确时可能导致V$ASM_DISK.HEADER_STATUS显示为PROVISIONED。

例如当发生硬件故障导致header的部分显得正常而仅仅checksum不正确。那么我们可以通过kfed来修复该问题的, kfed不愧和 amdu 、adhu合称ASM 三神器。

 

 

 

 

关注dbDao.com的新浪微博

扫码关注dbDao.com 微信公众号:

Speak Your Mind

TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569