ITPub博客

首页 > 数据库 > Oracle > ASM Disk Header

ASM Disk Header

原创 Oracle 作者:gydba 时间:2015-11-10 16:44:28 0 删除 编辑
WARNING: cache read a corrupted block gn=1 dsk=39 blk=18 from disk 39
NOTE: a corrupted block was dumped to the trace file
ERROR: cache failed to read dsk=39 blk=18 from disk(s): 39
ORA-15196: invalid ASM block header [kfc.c:8033] [check_kfbh] [2147483687] [18] [2154781313 != 2634714205]
System State dumped to trace file /home/oracle/admin/+ASM/bdump/+asm1_arb0_602136.trc
NOTE: cache initiating offline of disk 39  group 1
WARNING: offlining disk 39.3734428818 (BDC_DATA_0039) with mask 0x3
NOTE: PST update: grp = 1, dsk = 39, mode = 0x6

ASM Disk Header故障的一般处理,如果出现磁盘严重破坏的则需要工具处理。
现在进行模拟演示:
1)一个50M的磁盘,现在对他进行dd操作
[grid@dbaasm ~]$ dd if=/dev/oracleasm/disks/ASMDISK2 of=/tmp/ASMDISK2.dump bs=1048576 count=50
50+0 records in
50+0 records out
52428800 bytes (52 MB) copied, 0.667474 seconds, 78.5 MB/s

说明:$> dd if=<full path affected disk name> of=/tmp/<affected disk name>.dump bs=1048576 count=50     
       
2)查看下没有被破坏的分配单元信息
[grid@dbaasm ~]$ kfed read /dev/oracleasm/disks/ASMDISK1  | egrep 'ausize|dsknum|dskname|grpname|fgname'  
kfdhdb.dsknum:                        0 ; 0x024: 0x0000
kfdhdb.dskname:                ASMDISK1 ; 0x028: length=8
kfdhdb.grpname:                    DATA ; 0x048: length=4
kfdhdb.fgname:                 FG1_SAN1 ; 0x068: length=8
kfdhdb.ausize:                  2097152 ; 0x0bc: 0x00200000

说明:$> <ASM Oracle Home>/bin/kfed read <full path healthy disk name> | egrep 'ausize|dsknum|dskname|grpname|fgname'  
可以看出这个没有收到破坏的磁盘的 AU_SIZE=2M (2097152 ) & "/dev/oracleasm/disks/ASMDISK1" 

3)对破坏的磁盘组成员进行恢复
grid@dbaasm ~]$ kfed repair /dev/oracleasm/disks/ASMDISK2  ausz=2097152

说明:$> <ASM Oracle Home>/bin/kfed repair <full path affected disk name> ausz=<AU size from point #2>

4)查看效果
[grid@dbaasm ~]$  kfed read /dev/oracleasm/disks/ASMDISK2  | head -40
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:              2147483650 ; 0x008: disk=2
kfbh.check:                  4052202307 ; 0x00c: 0xf187b343
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: ORCLDISKASMDISK2 ; 0x000: length=16
kfdhdb.driver.reserved[0]:   1145918273 ; 0x008: 0x444d5341
kfdhdb.driver.reserved[1]:    843797321 ; 0x00c: 0x324b5349
kfdhdb.driver.reserved[2]:            0 ; 0x010: 0x00000000
kfdhdb.driver.reserved[3]:            0 ; 0x014: 0x00000000
kfdhdb.driver.reserved[4]:            0 ; 0x018: 0x00000000
kfdhdb.driver.reserved[5]:            0 ; 0x01c: 0x00000000
kfdhdb.compat:                186647296 ; 0x020: 0x0b200300
kfdhdb.dsknum:                        2 ; 0x024: 0x0002
kfdhdb.grptyp:                        2 ; 0x026: KFDGTP_NORMAL
kfdhdb.hdrsts:                        3 ; 0x027: KFDHDR_MEMBER
kfdhdb.dskname:                ASMDISK2 ; 0x028: length=8
kfdhdb.grpname:                    DATA ; 0x048: length=4
kfdhdb.fgname:                 FG2_SAN2 ; 0x068: length=8
kfdhdb.capname:                         ; 0x088: length=0
kfdhdb.crestmp.hi:             32974423 ; 0x0a8: HOUR=0x17 DAYS=0x12 MNTH=0x9 YEAR=0x7dc
kfdhdb.crestmp.lo:           1180930048 ; 0x0ac: USEC=0x0 MSEC=0xe4 SECS=0x26 MINS=0x11
kfdhdb.mntstmp.hi:             33003184 ; 0x0b0: HOUR=0x10 DAYS=0x15 MNTH=0x5 YEAR=0x7de
kfdhdb.mntstmp.lo:           1230240768 ; 0x0b4: USEC=0x0 MSEC=0xff SECS=0x15 MINS=0x12
kfdhdb.secsize:                     512 ; 0x0b8: 0x0200
kfdhdb.blksize:                    4096 ; 0x0ba: 0x1000
kfdhdb.ausize:                  2097152 ; 0x0bc: 0x00200000
kfdhdb.mfact:                    228480 ; 0x0c0: 0x00037c80
kfdhdb.dsksize:                    9769 ; 0x0c4: 0x00002629
kfdhdb.pmcnt:                         2 ; 0x0c8: 0x00000002
kfdhdb.fstlocn:                       1 ; 0x0cc: 0x00000001
kfdhdb.altlocn:                       2 ; 0x0d0: 0x00000002
kfdhdb.f1b1locn:                      0 ; 0x0d4: 0x00000000
kfdhdb.redomirrors[0]:                0 ; 0x0d8: 0x0000
.
.
.
.

说明:$> <ASM Oracle Home>/bin/kfed read <full path affected disk name>  | head -40

5)重新加载磁盘组
SQL> alter diskgroup DATA mount;
Diskgroup altered.


如果出现磁盘头顺坏会有这种信息:
[grid@dbaasm ~]$ kfed read /dev/oracleasm/disks/ASMDISK2
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
000000000 00000000 00000000 00000000 00000000  [................]
  Repeat 255 times
KFED-00322: Invalid content encountered during block traversal: [kfbtTraverseBlock][Invalid OSM block type][][0]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30430420/viewspace-1827217/,如需转载,请注明出处,否则将追究法律责任。

下一篇: ASM 冗余
请登录后发表评论 登录
全部评论

注册时间:2015-08-24

  • 博文量
    77
  • 访问量
    153149