ORA-15063: ASM discovered an insufficient number of disks for diskgroup

概述

ASM disk header是ASM disk的第一个块,即AU#0 BLOCK#0,disk header中记录了ASM disk的重要信息,比如ASM disk名字,diskgroup名字,failure group名字,AU size等等.

  • 通过视图v$asm_diskgroup和v$asm_disk查看:
select group_number,disk_number,mount_status,header_status,name,path from v$asm_disk;   
GROUP_NUMBER DISK_NUMBER MOUNT_S HEADER_STATUS   NAME     PATH
------------ ----------- ------- --------------- -------- --------------------
           1           0 CACHED  MEMBER          ASMDISK1 ORCL:ASMDISK1


select GROUP_NUMBER,name,state,type from v$asm_diskgroup;
GROUP_NUMBER NAME     STATE    TYPE
------------ -------- -------- ------
1 DGDATA   MOUNTED  EXTERN

  • 通过Kfed 查看ASM disk 信息:
kfed read /dev/oracleasm/disks/ASMDISK1 
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:                  2402748364 ; 0x00c: 0x8f3707cc
kfbh.fcn.base:                     3580 ; 0x010: 0x00000dfc
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kfdhdb.driver.provstr: ORCLDISKASMDISK1 ; 0x000: length=16 
kfdhdb.grptyp:                        1 ; 0x026: KFDGTP_EXTERNAL
kfdhdb.hdrsts:                        3 ; 0x027: KFDHDR_MEMBER
kfdhdb.dskname:                ASMDISK1 ; 0x028: length=8<<<< disk名称
kfdhdb.grpname:                  DGDATA ; 0x048: length=6<<<< group名称
kfdhdb.fgname:                 ASMDISK1 ; 0x068: length=8<<<< failure group名称
kfdhdb.blksize:                    4096 ; 0x0ba: 0x1000  <<<< ASM block size = 4KB
kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000<<<< AU size = 1MB

故障处理

  • 如果ASM disk header损坏,那么操作这个ASM disk时会报错ORA-15063,例如:

SQL> alter diskgroup dgdata mount;
 alter diskgroup dgdata mount
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15017: diskgroup "DGDATA" cannot be mounted
ORA-15063: ASM discovered an insufficient number of disks for diskgroup "DGDATA"
  • kfed检查ASM disk header,Kfed输出显示disk header的信息全部都是0,说明ASM disk header信息被覆盖/损坏
$ kfed read /dev/oracleasm/disks/ASMDISK1 AUNUM=0 BLKNUM=0
kfbh.endian:                          0 ; 0x000: 0x00
kfbh.hard:                            0 ; 0x001: 0x00
kfbh.type:                            0 ; 0x002: KFBTYP_INVALID
kfbh.datfmt:                          0 ; 0x003: 0x00
kfbh.block.blk:                       0 ; 0x004: blk=0
kfbh.block.obj:                       0 ; 0x008: file=0
kfbh.check:                           0 ; 0x00c: 0x00000000
kfbh.fcn.base:                        0 ; 0x010: 0x00000000
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
7FD4F8AE1400 00000000 00000000 00000000 00000000  [................]
  Repeat 255 times
KFED-00322: Invalid content encountered during block traversal: [kfbtTraverseBlock][Invalid OSM block type][][0]

3.在11.1.0.7之前 ASM disk header没有自动备份,需要手动执行kfed read或者dd来备份,从11.1.0.7开始ASM disk header会自动备份到AU#1的倒数第二个block。对于AU size是1MB的DISKGROUP,每个AU包括block数量=1024KB/4KB=256个,因此备份信息位于AU#1的第254号block,查看ASM disk header备份信息,备份信息与ASM disk header信息完全一致:

$ kfed read /dev/oracleasm/disks/ASMDISK1 AUNUM=1 BLKNUM=254 ausz=1048576 | more


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

4.恢复ASM disk header的方法是执行kfed repair命令,利用备份信息恢复ASM disk header:
kfed repair /dev/oracleasm/disks/ASMDISK1 aus=1048576

你可能感兴趣的:(ORA-15063: ASM discovered an insufficient number of disks for diskgroup)