asm磁盘头损坏恢复案例

         一个两节点的RAC,对其中一个节点进行reboot后,ASM实例启动正常,但是DATA磁盘组无法mount(CRS和FRA磁盘组可以正常mount),检查ASM alert日志报错如下:
Tue Aug 09 12:58:37 2016 
SQL> ALTER DISKGROUP DATA MOUNT /* asm agent *//* {1:58726:2} */ 
NOTE: cache registered group DATA number=2 incarn=0xc792116f 
NOTE: cache began mount (not first) of group DATA number=2 incarn=0xc792116f 
NOTE: Assigning number (2,1) to disk (/dev/iscsi/asm-data10-360002ac0000000000000000f00012fa3) 
NOTE: Assigning number (2,9) to disk (/dev/iscsi/asm-data9-360002ac0000000000000000e00012fa3) 
NOTE: Assigning number (2,8) to disk (/dev/iscsi/asm-data8-360002ac0000000000000000d00012fa3) 
NOTE: Assigning number (2,7) to disk (/dev/iscsi/asm-data7-360002ac0000000000000000c00012fa3) 
NOTE: Assigning number (2,6) to disk (/dev/iscsi/asm-data6-360002ac0000000000000000b00012fa3) 
NOTE: Assigning number (2,5) to disk (/dev/iscsi/asm-data5-360002ac0000000000000000a00012fa3) 
NOTE: Assigning number (2,4) to disk (/dev/iscsi/asm-data4-360002ac0000000000000000900012fa3) 
NOTE: Assigning number (2,3) to disk (/dev/iscsi/asm-data3-360002ac0000000000000000800012fa3) 
NOTE: Assigning number (2,2) to disk (/dev/iscsi/asm-data2-360002ac0000000000000000700012fa3) 
ERROR: no read quorum in group: required 1, found 0 disks 
NOTE: cache dismounting (clean) group 2/0xC792116F (DATA) 
NOTE: messaging CKPT to quiesce pins Unix process pid: 46414, image: oracle@smsdb1 (TNS V1-V3) 
NOTE: dbwr not being msg'd to dismount 
NOTE: lgwr not being msg'd to dismount 
NOTE: cache dismounted group 2/0xC792116F (DATA) 
NOTE: cache ending mount (fail) of group DATA number=2 incarn=0xc792116f 
NOTE: cache deleting context for group DATA 2/0xc792116f 
Tue Aug 09 12:58:37 2016 
ASM Health Checker found 1 new failures 
GMON dismounting group 2 at 14 for pid 31, osid 46414 
NOTE: Disk in mode 0x8 marked for de-assignment 
NOTE: Disk in mode 0x8 marked for de-assignment 
NOTE: Disk in mode 0x8 marked for de-assignment 
NOTE: Disk in mode 0x8 marked for de-assignment 
NOTE: Disk in mode 0x8 marked for de-assignment 
NOTE: Disk in mode 0x8 marked for de-assignment 
NOTE: Disk in mode 0x8 marked for de-assignment 
NOTE: Disk in mode 0x8 marked for de-assignment 
NOTE: Disk in mode 0x8 marked for de-assignment 
ERROR: diskgroup DATA was not mounted 
ORA-15032: not all alterations performed 
ORA-15017: diskgroup "DATA" cannot be mounted 
ORA-15063: ASM discovered an insufficient number of disks for diskgroup "DATA" 
ERROR: ALTER DISKGROUP DATA MOUNT /* asm agent *//* {1:58726:2} */ 
Tue Aug 09 12:59:30 2016 
ALTER SYSTEM SET local_listener=' (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.249.15.83)(PORT=1521))))' SCOPE=MEMORY SID='+ASM1'; 
         DATA磁盘组正常mount的时候日志如下,对比发现/dev/iscsi/asm-data1-360002ac0000000000000000600012fa3这块磁盘没有识别到,导致磁盘组无法正常mount
Mon Aug 01 18:26:18 2016
GMON querying group 2 at 6 for pid 29, osid 52630
NOTE: cache opening disk 0 of grp 2: DATA_0000 path:/dev/iscsi/asm-data1-360002ac0000000000000000600012fa3
NOTE: F1X0 found on disk 0 au 2 fcn 0.0
NOTE: cache opening disk 1 of grp 2: DATA_0001 path:/dev/iscsi/asm-data10-360002ac0000000000000000f00012fa3
NOTE: cache opening disk 2 of grp 2: DATA_0002 path:/dev/iscsi/asm-data2-360002ac0000000000000000700012fa3
NOTE: cache opening disk 3 of grp 2: DATA_0003 path:/dev/iscsi/asm-data3-360002ac0000000000000000800012fa3
NOTE: cache opening disk 4 of grp 2: DATA_0004 path:/dev/iscsi/asm-data4-360002ac0000000000000000900012fa3
NOTE: cache opening disk 5 of grp 2: DATA_0005 path:/dev/iscsi/asm-data5-360002ac0000000000000000a00012fa3
NOTE: cache opening disk 6 of grp 2: DATA_0006 path:/dev/iscsi/asm-data6-360002ac0000000000000000b00012fa3
NOTE: cache opening disk 7 of grp 2: DATA_0007 path:/dev/iscsi/asm-data7-360002ac0000000000000000c00012fa3
NOTE: cache opening disk 8 of grp 2: DATA_0008 path:/dev/iscsi/asm-data8-360002ac0000000000000000d00012fa3
NOTE: cache opening disk 9 of grp 2: DATA_0009 path:/dev/iscsi/asm-data9-360002ac0000000000000000e00012fa3
NOTE: cache mounting (not first) external redundancy group 2/0x3ABDBB13 (DATA)
kjbdomatt send to inst 2
Mon Aug 01 18:26:18 2016
NOTE: attached to recovery domain 2
NOTE: redo buffer size is 512 blocks (2101760 bytes)
Mon Aug 01 18:26:18 2016
NOTE: LGWR attempting to mount thread 2 for diskgroup 2 (DATA)
NOTE: ACD expansion required for disk group 2
NOTE: LGWR attempting to mount thread 2 for diskgroup 2 (DATA)
NOTE: LGWR found thread 2 closed at ABA 0.11262
NOTE: LGWR mounted thread 2 for diskgroup 2 (DATA)
NOTE: LGWR opening thread 2 at fcn 0.0 ABA 2.0
NOTE: setting 11.2 start ABA for group DATA thread 2 to 2.0
NOTE: cache mounting group 2/0x3ABDBB13 (DATA) succeeded
NOTE: cache ending mount (success) of group DATA number=2 incarn=0x3abdbb13
GMON querying group 2 at 7 for pid 18, osid 51651
Mon Aug 01 18:26:20 2016
NOTE: Instance updated compatible.asm to 11.2.0.0.0 for grp 2
SUCCESS: diskgroup DATA was mounted
SUCCESS: ALTER DISKGROUP DATA MOUNT  /* asm agent *//* {2:44208:131} */
Mon Aug 01 18:26:20 2016
NOTE: diskgroup resource ora.DATA.dg is updated

        尝试在使用srvctl命令手动启动磁盘组,报错如下:
[grid@smsdb2 racg]$ srvctl start diskgroup -g data -n smsdb1
PRCR-1013 : Failed to start resource ora.DATA.dg
PRCR-1064 : Failed to start resource ora.DATA.dg on node smsdb1
CRS-5017: The resource action "ora.DATA.dg start" encountered the following error: 
ORA-15032: not all alterations performed
ORA-15017: diskgroup "DATA" cannot be mounted
ORA-15063: ASM discovered an insufficient number of disks for diskgroup "DATA"
. For details refer to "(:CLSN00107:)" in "/u01/app/grid_home/log/smsdb1/agent/crsd/oraagent_grid/oraagent_grid.log".

CRS-2674: Start of 'ora.DATA.dg' on 'smsdb1' failed

          使用kfed命令查看磁盘状态,报KFED-00322
[root@smsdb1 ~]# cd /dev/iscsi/
[root@smsdb1 iscsi]# ls -l
total 0
lrwxrwxrwx 1 root root 8 Aug 9 16:13 asm-crs1-360002ac0000000000000001000012fa3 -> ../dm-15
lrwxrwxrwx 1 root root 8 Aug 9 16:13 asm-crs2-360002ac0000000000000001100012fa3 -> ../dm-16
lrwxrwxrwx 1 root root 8 Aug 9 16:13 asm-crs3-360002ac0000000000000001200012fa3 -> ../dm-17
lrwxrwxrwx 1 root root 8 Aug 9 16:13 asm-data10-360002ac0000000000000000f00012fa3 -> ../dm-11
lrwxrwxrwx 1 root root 7 Aug 9 16:13 asm-data1-360002ac0000000000000000600012fa3 -> ../dm-2
lrwxrwxrwx 1 root root 7 Aug 9 16:13 asm-data2-360002ac0000000000000000700012fa3 -> ../dm-3
lrwxrwxrwx 1 root root 7 Aug 9 16:13 asm-data3-360002ac0000000000000000800012fa3 -> ../dm-4
lrwxrwxrwx 1 root root 7 Aug 9 16:13 asm-data4-360002ac0000000000000000900012fa3 -> ../dm-5
lrwxrwxrwx 1 root root 7 Aug 9 16:13 asm-data5-360002ac0000000000000000a00012fa3 -> ../dm-6
lrwxrwxrwx 1 root root 7 Aug 9 16:13 asm-data6-360002ac0000000000000000b00012fa3 -> ../dm-7
lrwxrwxrwx 1 root root 7 Aug 9 16:13 asm-data7-360002ac0000000000000000c00012fa3 -> ../dm-8
lrwxrwxrwx 1 root root 7 Aug 9 16:13 asm-data8-360002ac0000000000000000d00012fa3 -> ../dm-9
lrwxrwxrwx 1 root root 8 Aug 9 16:13 asm-data9-360002ac0000000000000000e00012fa3 -> ../dm-10
lrwxrwxrwx 1 root root 8 Aug 9 16:13 asm-fra1-360002ac0000000000000001300012fa3 -> ../dm-12
lrwxrwxrwx 1 root root 8 Aug 9 16:13 asm-fra2-360002ac0000000000000001400012fa3 -> ../dm-13
lrwxrwxrwx 1 root root 8 Aug 9 16:13 asm-fra3-360002ac0000000000000001500012fa3 -> ../dm-14 
[grid@smsdb1 ~]$ kfed read /dev/dm-2|more 
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 
7F5A3E892400 00000000 00000000 00000000 00000000 [................] 
Repeat 26 times 
7F5A3E8925B0 00000000 00000000 33248612 00000000 [..........$3....] 
7F5A3E8925C0 00000000 00000000 00000000 00000000 [................] 
Repeat 2 times 
7F5A3E8925F0 00000000 00000000 00000000 AA550000 [..............U.] 
7F5A3E892600 00000000 00000000 00000000 00000000 [................] 
Repeat 223 times 
KFED-00322: Invalid content encountered during block traversal: [kfbtTraverseBlock][Invalid OSM block type][][0] 

        使用下面文档尝试是否由于bug导致,发现磁盘状态任然异常
        KFED Is Reporting KFED-00322 [Invalid OSM block type] On Healthy ASM Member Disks. (文档 ID 1624223.1)
# blockdev --flushbufs /dev/dm
[root@smsdb1 iscsi]# blockdev --flushbufs /dev/dm-2
[root@smsdb1 iscsi]# su - grid
[grid@smsdb1 ~]$ kfed read /dev/dm-2 |more
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
7FB2EE0BA400 00000000 00000000 00000000 00000000 [................]
Repeat 26 times
7FB2EE0BA5B0 00000000 00000000 33248612 00000000 [..........$3....]
7FB2EE0BA5C0 00000000 00000000 00000000 00000000 [................]
Repeat 2 times
7FB2EE0BA5F0 00000000 00000000 00000000 AA550000 [..............U.]
7FB2EE0BA600 00000000 00000000 00000000 00000000 [................]
Repeat 223 times
KFED-00322: Invalid content encountered during block traversal: [kfbtTraverseBlock][Invalid OSM block type][][0]

          使用下面文档方案恢复磁盘头后,DATA磁盘组成功mount
         How To Restore/Repair/Fix An Overwritten (KFBTYP_INVALID) ASM Disk Header (First 4K) 10.2.0.5, 11.1.0.7, 11.2 And Onwards (文档 ID 1088867.1)

[grid@smsdb1 ~]$ dd if=/dev/dm-2 of=/tmp/asm_data1.dump bs=1048576 count=50
50+0 records in
50+0 records out
52428800 bytes (52 MB) copied, 0.36149 s, 145 MB/s

[grid@smsdb1 ~]$ kfed repair /dev/dm-2 ausz=4194304
[grid@smsdb1 ~]$ kfed read /dev/dm-2 | egrep 'provstr|grptyp|hdrsts|dskname|grpname|fgname'
kfdhdb.driver.provstr:         ORCLDISK ; 0x000: length=8
kfdhdb.grptyp:                        1 ; 0x026: KFDGTP_EXTERNAL
kfdhdb.hdrsts:                        3 ; 0x027: KFDHDR_MEMBER
kfdhdb.dskname:               DATA_0000 ; 0x028: length=9
kfdhdb.grpname:                    DATA ; 0x048: length=4
kfdhdb.fgname:                DATA_0000 ; 0x068: length=9

[grid@smsdb1 ~]$ srvctl start diskgroup -g data -n smsdb1

         再次重启服务器,DATA磁盘组可正常mount,具体磁盘头损坏原因尚不得知。

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

转载于:http://blog.itpub.net/29953799/viewspace-2123254/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值