首页 > 代码库 > oracle11g ASM磁盘组头部损坏修复(asm修复2)
oracle11g ASM磁盘组头部损坏修复(asm修复2)
--编译KFED
[oracle@rac2 lib]$cd $ORACLE_HOME/rdbms/lib
[oracle@rac2 lib]$ pwd
/u01/app/oracle/product/10.2.0/db_1/rdbms/lib
[oracle@rac2 lib]$ make -f ins_rdbms.mk ikfed
[oracle@rac1 ~]$ kfed read /dev/oracleasm/disks/VOL1
kfbh.endian: 1 ; 0x000: 0x01
kfbh.hard: 130 ; 0x001: 0x82
kfbh.type: 1 ; 0x002: KFBTYP_DISKHEAD -- 磁盘头总是KFBTYP_DISKHEAD
kfbh.datfmt: 1 ; 0x003: 0x01
kfbh.block.blk: 0 ; 0x004: T=0 NUMB=0x0
kfbh.block.obj: 2147483648 ; 0x008: TYPE=0x8 NUMB=0x0
kfbh.check: 1464188596 ; 0x00c: 0x5745beb4
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: ORCLDISKVOL1 ; 0x000: length=12
kfdhdb.driver.reserved[0]: 827084630 ; 0x008: 0x314c4f56
kfdhdb.driver.reserved[1]: 0 ; 0x00c: 0x00000000
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: 186646528 ; 0x020: 0x0b200000
kfdhdb.dsknum: 0 ; 0x024: 0x0000
kfdhdb.grptyp: 1 ; 0x026: KFDGTP_EXTERNAL
kfdhdb.hdrsts: 3 ; 0x027: KFDHDR_MEMBER
kfdhdb.dskname: VOL1 ; 0x028: length=4
kfdhdb.grpname: ASMDG ; 0x048: length=5
kfdhdb.fgname: VOL1 ; 0x068: length=4
kfdhdb.capname: ; 0x088: length=0
kfdhdb.crestmp.hi: 33003570 ; 0x0a8: HOUR=0x12 DAYS=0x1 MNTH=0x6 YEAR=0x7de
kfdhdb.crestmp.lo: 3991771136 ; 0x0ac: USEC=0x0 MSEC=0x366 SECS=0x1e MINS=0x3b
kfdhdb.mntstmp.hi: 33005233 ; 0x0b0: HOUR=0x11 DAYS=0x15 MNTH=0x7 YEAR=0x7de
kfdhdb.mntstmp.lo: 3079015424 ; 0x0b4: USEC=0x0 MSEC=0x183 SECS=0x38 MINS=0x2d
kfdhdb.secsize: 512 ; 0x0b8: 0x0200
kfdhdb.blksize: 4096 ; 0x0ba: 0x1000
kfdhdb.ausize: 1048576 ; 0x0bc: 0x00100000
kfdhdb.mfact: 113792 ; 0x0c0: 0x0001bc80
kfdhdb.dsksize: 10236 ; 0x0c4: 0x000027fc --本磁盘包含的AU数量。kfdhdb.ausize * dsksize_kfdhdb = disk size
kfdhdb.pmcnt: 2 ; 0x0c8: 0x00000002 --AU的物理地址空间。
kfdhdb.fstlocn: 1 ; 0x0cc: 0x00000001 --说明第一个AU后,是用户可用空间
kfdhdb.altlocn: 2 ; 0x0d0: 0x00000002 --说明文件目录开始自第二个AU 与博客一直
kfdhdb.f1b1locn: 2 ; 0x0d4: 0x00000002
kfdhdb.redomirrors[0]: 0 ; 0x0d8: 0x0000
kfdhdb.redomirrors[1]: 0 ; 0x0da: 0x0000
kfdhdb.redomirrors[2]: 0 ; 0x0dc: 0x0000
kfdhdb.redomirrors[3]: 0 ; 0x0de: 0x0000
kfdhdb.dbcompat: 168820736 ; 0x0e0: 0x0a100000
kfdhdb.grpstmp.hi: 33003570 ; 0x0e4: HOUR=0x12 DAYS=0x1 MNTH=0x6 YEAR=0x7de
kfdhdb.grpstmp.lo: 3991513088 ; 0x0e8: USEC=0x0 MSEC=0x26a SECS=0x1e MINS=0x3b
kfdhdb.vfstart: 0 ; 0x0ec: 0x00000000
kfdhdb.vfend: 0 ; 0x0f0: 0x00000000
kfdhdb.spfile: 33 ; 0x0f4: 0x00000021
kfdhdb.spfflg: 1 ; 0x0f8: 0x00000001
kfdhdb.ub4spare[0]: 0 ; 0x0fc: 0x00000000
kfdhdb.ub4spare[1]: 0 ; 0x100: 0x00000000
kfdhdb.ub4spare[2]: 0 ; 0x104: 0x00000000
kfdhdb.ub4spare[3]: 0 ; 0x108: 0x00000000
kfdhdb.ub4spare[4]: 0 ; 0x10c: 0x00000000
kfdhdb.ub4spare[5]: 0 ; 0x110: 0x00000000
kfdhdb.ub4spare[6]: 0 ; 0x114: 0x00000000
kfdhdb.ub4spare[7]: 0 ; 0x118: 0x00000000
kfdhdb.ub4spare[8]: 0 ; 0x11c: 0x00000000
kfdhdb.ub4spare[9]: 0 ; 0x120: 0x00000000
kfdhdb.ub4spare[10]: 0 ; 0x124: 0x00000000
kfdhdb.ub4spare[11]: 0 ; 0x128: 0x00000000
kfdhdb.ub4spare[12]: 0 ; 0x12c: 0x00000000
kfdhdb.ub4spare[13]: 0 ; 0x130: 0x00000000
kfdhdb.ub4spare[14]: 0 ; 0x134: 0x00000000
kfdhdb.ub4spare[15]: 0 ; 0x138: 0x00000000
kfdhdb.ub4spare[16]: 0 ; 0x13c: 0x00000000
kfdhdb.ub4spare[17]: 0 ; 0x140: 0x00000000
kfdhdb.ub4spare[18]: 0 ; 0x144: 0x00000000
kfdhdb.ub4spare[19]: 0 ; 0x148: 0x00000000
kfdhdb.ub4spare[20]: 0 ; 0x14c: 0x00000000
kfdhdb.ub4spare[21]: 0 ; 0x150: 0x00000000
kfdhdb.ub4spare[22]: 0 ; 0x154: 0x00000000
kfdhdb.ub4spare[23]: 0 ; 0x158: 0x00000000
kfdhdb.ub4spare[24]: 0 ; 0x15c: 0x00000000
kfdhdb.ub4spare[25]: 0 ; 0x160: 0x00000000
kfdhdb.ub4spare[26]: 0 ; 0x164: 0x00000000
kfdhdb.ub4spare[27]: 0 ; 0x168: 0x00000000
kfdhdb.ub4spare[28]: 0 ; 0x16c: 0x00000000
kfdhdb.ub4spare[29]: 0 ; 0x170: 0x00000000
kfdhdb.ub4spare[30]: 0 ; 0x174: 0x00000000
kfdhdb.ub4spare[31]: 0 ; 0x178: 0x00000000
kfdhdb.ub4spare[32]: 0 ; 0x17c: 0x00000000
kfdhdb.ub4spare[33]: 0 ; 0x180: 0x00000000
kfdhdb.ub4spare[34]: 0 ; 0x184: 0x00000000
kfdhdb.ub4spare[35]: 0 ; 0x188: 0x00000000
kfdhdb.ub4spare[36]: 0 ; 0x18c: 0x00000000
kfdhdb.ub4spare[37]: 0 ; 0x190: 0x00000000
kfdhdb.ub4spare[38]: 0 ; 0x194: 0x00000000
kfdhdb.ub4spare[39]: 0 ; 0x198: 0x00000000
kfdhdb.ub4spare[40]: 0 ; 0x19c: 0x00000000
kfdhdb.ub4spare[41]: 0 ; 0x1a0: 0x00000000
kfdhdb.ub4spare[42]: 0 ; 0x1a4: 0x00000000
kfdhdb.ub4spare[43]: 0 ; 0x1a8: 0x00000000
kfdhdb.ub4spare[44]: 0 ; 0x1ac: 0x00000000
kfdhdb.ub4spare[45]: 0 ; 0x1b0: 0x00000000
kfdhdb.ub4spare[46]: 0 ; 0x1b4: 0x00000000
kfdhdb.ub4spare[47]: 0 ; 0x1b8: 0x00000000
kfdhdb.ub4spare[48]: 0 ; 0x1bc: 0x00000000
kfdhdb.ub4spare[49]: 0 ; 0x1c0: 0x00000000
kfdhdb.ub4spare[50]: 0 ; 0x1c4: 0x00000000
kfdhdb.ub4spare[51]: 0 ; 0x1c8: 0x00000000
kfdhdb.ub4spare[52]: 0 ; 0x1cc: 0x00000000
kfdhdb.ub4spare[53]: 0 ; 0x1d0: 0x00000000
kfdhdb.acdb.aba.seq: 0 ; 0x1d4: 0x00000000
kfdhdb.acdb.aba.blk: 0 ; 0x1d8: 0x00000000
kfdhdb.acdb.ents: 0 ; 0x1dc: 0x0000
kfdhdb.acdb.ub2spare: 0 ; 0x1de: 0x0000
--网上的替换 这些怎么那么随便...
[oracle@rac1 ~]$ kfed read /dev/oracleasm/disks/VOL1 > vol1.header
[oracle@rac1 ~]$ kfed read /dev/oracleasm/disks/VOL2 > vol2.header
[oracle@rac1 ~]$ diff vol1.header vol2.header
6,7c6,7
< kfbh.block.obj: 2147483648 ; 0x008: TYPE=0x8 NUMB=0x0
< kfbh.check: 1464188596 ; 0x00c: 0x5745beb4
---
> kfbh.block.obj: 2147483649 ; 0x008: TYPE=0x8 NUMB=0x1
> kfbh.check: 1413856918 ; 0x00c: 0x5445be96
12,13c12,13
< kfdhdb.driver.provstr: ORCLDISKVOL1 ; 0x000: length=12
< kfdhdb.driver.reserved[0]: 827084630 ; 0x008: 0x314c4f56
---
> kfdhdb.driver.provstr: ORCLDISKVOL2 ; 0x000: length=12
> kfdhdb.driver.reserved[0]: 843861846 ; 0x008: 0x324c4f56
20c20
< kfdhdb.dsknum: 0 ; 0x024: 0x0000
---
> kfdhdb.dsknum: 1 ; 0x024: 0x0001
23c23
< kfdhdb.dskname: VOL1 ; 0x028: length=4
---
> kfdhdb.dskname: VOL2 ; 0x028: length=4
25c25
< kfdhdb.fgname: VOL1 ; 0x068: length=4
---
> kfdhdb.fgname: VOL2 ; 0x068: length=4
39c39
< kfdhdb.f1b1locn: 2 ; 0x0d4: 0x00000002
---
> kfdhdb.f1b1locn: 0 ; 0x0d4: 0x00000000
49,50c49,50
< kfdhdb.spfile: 33 ; 0x0f4: 0x00000021
< kfdhdb.spfflg: 1 ; 0x0f8: 0x00000001
---
> kfdhdb.spfile: 0 ; 0x0f4: 0x00000000
> kfdhdb.spfflg: 0 ; 0x0f8: 0x00000000
--#########################################################################
--查找spfile的位置http://www.xifenfei.com/4071.html
[oracle@rac1 ~]$
[oracle@rac1 ~]$ kfed dev=/dev/oracleasm/disks/VOL2 op=READ|egrep "kfdhdb.sp|ausize"
kfdhdb.ausize: 1048576 ; 0x0bc: 0x00100000
kfdhdb.spfile: 0 ; 0x0f4: 0x00000000
kfdhdb.spfflg: 0 ; 0x0f8: 0x00000000
[oracle@rac1 ~]$ kfed dev=/dev/oracleasm/disks/VOL1 op=READ|egrep "kfdhdb.sp|ausize"
kfdhdb.ausize: 1048576 ; 0x0bc: 0x00100000
kfdhdb.spfile: 33 ; 0x0f4: 0x00000021
kfdhdb.spfflg: 1 ; 0x0f8: 0x00000001
--#########################################################################
3.使用kfed repair修改损坏asm disk header
rac1-> kfed repair ‘/dev/raw/raw1‘
rac1-> kfed read /dev/raw/raw1 blknum=0
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: T=0 NUMB=0x0
kfbh.block.obj: 2147483648 ; 0x008: TYPE=0x8 NUMB=0x0
kfbh.check: 883602253 ; 0x00c: 0x34aab34d
kfbh.fcn.base: 0 ; 0x010: 0x00000000
kfbh.fcn.wrap: 0 ; 0x014: 0x00000000
kfbh.spare1: 0 ; 0x018: 0x00000000
kfbh.spare2: 0 ; 0x01c: 0x00000000
--#########################################################################
4.使用kfed merge恢复asm disk header
rac1-> dd if=/dev/zero of=/dev/raw/raw1 bs=4096 count=1
1+0 records in
1+0 records out
rac1-> kfed read /dev/raw/raw1 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: T=0 NUMB=0x0
kfbh.block.obj: 0 ; 0x008: TYPE=0x0 NUMB=0x0
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
http://www.itpub.net/thread-1597605-1-1.html 具体信息参考这里:
[oracle@rac1 ~]$ kfod disk=all
--------------------------------------------------------------------------------
Disk Size Path User Group
================================================================================
1: 10236 Mb ORCL:VOL1 <unknown> <unknown>
2: 10236 Mb ORCL:VOL2 <unknown> <unknown>
--------------------------------------------------------------------------------
ORACLE_SID ORACLE_HOME
================================================================================
+ASM /orac/orahome/app/11.2.0/grid
[oracle@rac1 ~]$
[oracle@rac2 lib]$cd $ORACLE_HOME/rdbms/lib
[oracle@rac2 lib]$ pwd
/u01/app/oracle/product/10.2.0/db_1/rdbms/lib
[oracle@rac2 lib]$ make -f ins_rdbms.mk ikfed
[oracle@rac1 ~]$ kfed read /dev/oracleasm/disks/VOL1
kfbh.endian: 1 ; 0x000: 0x01
kfbh.hard: 130 ; 0x001: 0x82
kfbh.type: 1 ; 0x002: KFBTYP_DISKHEAD -- 磁盘头总是KFBTYP_DISKHEAD
kfbh.datfmt: 1 ; 0x003: 0x01
kfbh.block.blk: 0 ; 0x004: T=0 NUMB=0x0
kfbh.block.obj: 2147483648 ; 0x008: TYPE=0x8 NUMB=0x0
kfbh.check: 1464188596 ; 0x00c: 0x5745beb4
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: ORCLDISKVOL1 ; 0x000: length=12
kfdhdb.driver.reserved[0]: 827084630 ; 0x008: 0x314c4f56
kfdhdb.driver.reserved[1]: 0 ; 0x00c: 0x00000000
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: 186646528 ; 0x020: 0x0b200000
kfdhdb.dsknum: 0 ; 0x024: 0x0000
kfdhdb.grptyp: 1 ; 0x026: KFDGTP_EXTERNAL
kfdhdb.hdrsts: 3 ; 0x027: KFDHDR_MEMBER
kfdhdb.dskname: VOL1 ; 0x028: length=4
kfdhdb.grpname: ASMDG ; 0x048: length=5
kfdhdb.fgname: VOL1 ; 0x068: length=4
kfdhdb.capname: ; 0x088: length=0
kfdhdb.crestmp.hi: 33003570 ; 0x0a8: HOUR=0x12 DAYS=0x1 MNTH=0x6 YEAR=0x7de
kfdhdb.crestmp.lo: 3991771136 ; 0x0ac: USEC=0x0 MSEC=0x366 SECS=0x1e MINS=0x3b
kfdhdb.mntstmp.hi: 33005233 ; 0x0b0: HOUR=0x11 DAYS=0x15 MNTH=0x7 YEAR=0x7de
kfdhdb.mntstmp.lo: 3079015424 ; 0x0b4: USEC=0x0 MSEC=0x183 SECS=0x38 MINS=0x2d
kfdhdb.secsize: 512 ; 0x0b8: 0x0200
kfdhdb.blksize: 4096 ; 0x0ba: 0x1000
kfdhdb.ausize: 1048576 ; 0x0bc: 0x00100000
kfdhdb.mfact: 113792 ; 0x0c0: 0x0001bc80
kfdhdb.dsksize: 10236 ; 0x0c4: 0x000027fc --本磁盘包含的AU数量。kfdhdb.ausize * dsksize_kfdhdb = disk size
kfdhdb.pmcnt: 2 ; 0x0c8: 0x00000002 --AU的物理地址空间。
kfdhdb.fstlocn: 1 ; 0x0cc: 0x00000001 --说明第一个AU后,是用户可用空间
kfdhdb.altlocn: 2 ; 0x0d0: 0x00000002 --说明文件目录开始自第二个AU 与博客一直
kfdhdb.f1b1locn: 2 ; 0x0d4: 0x00000002
kfdhdb.redomirrors[0]: 0 ; 0x0d8: 0x0000
kfdhdb.redomirrors[1]: 0 ; 0x0da: 0x0000
kfdhdb.redomirrors[2]: 0 ; 0x0dc: 0x0000
kfdhdb.redomirrors[3]: 0 ; 0x0de: 0x0000
kfdhdb.dbcompat: 168820736 ; 0x0e0: 0x0a100000
kfdhdb.grpstmp.hi: 33003570 ; 0x0e4: HOUR=0x12 DAYS=0x1 MNTH=0x6 YEAR=0x7de
kfdhdb.grpstmp.lo: 3991513088 ; 0x0e8: USEC=0x0 MSEC=0x26a SECS=0x1e MINS=0x3b
kfdhdb.vfstart: 0 ; 0x0ec: 0x00000000
kfdhdb.vfend: 0 ; 0x0f0: 0x00000000
kfdhdb.spfile: 33 ; 0x0f4: 0x00000021
kfdhdb.spfflg: 1 ; 0x0f8: 0x00000001
kfdhdb.ub4spare[0]: 0 ; 0x0fc: 0x00000000
kfdhdb.ub4spare[1]: 0 ; 0x100: 0x00000000
kfdhdb.ub4spare[2]: 0 ; 0x104: 0x00000000
kfdhdb.ub4spare[3]: 0 ; 0x108: 0x00000000
kfdhdb.ub4spare[4]: 0 ; 0x10c: 0x00000000
kfdhdb.ub4spare[5]: 0 ; 0x110: 0x00000000
kfdhdb.ub4spare[6]: 0 ; 0x114: 0x00000000
kfdhdb.ub4spare[7]: 0 ; 0x118: 0x00000000
kfdhdb.ub4spare[8]: 0 ; 0x11c: 0x00000000
kfdhdb.ub4spare[9]: 0 ; 0x120: 0x00000000
kfdhdb.ub4spare[10]: 0 ; 0x124: 0x00000000
kfdhdb.ub4spare[11]: 0 ; 0x128: 0x00000000
kfdhdb.ub4spare[12]: 0 ; 0x12c: 0x00000000
kfdhdb.ub4spare[13]: 0 ; 0x130: 0x00000000
kfdhdb.ub4spare[14]: 0 ; 0x134: 0x00000000
kfdhdb.ub4spare[15]: 0 ; 0x138: 0x00000000
kfdhdb.ub4spare[16]: 0 ; 0x13c: 0x00000000
kfdhdb.ub4spare[17]: 0 ; 0x140: 0x00000000
kfdhdb.ub4spare[18]: 0 ; 0x144: 0x00000000
kfdhdb.ub4spare[19]: 0 ; 0x148: 0x00000000
kfdhdb.ub4spare[20]: 0 ; 0x14c: 0x00000000
kfdhdb.ub4spare[21]: 0 ; 0x150: 0x00000000
kfdhdb.ub4spare[22]: 0 ; 0x154: 0x00000000
kfdhdb.ub4spare[23]: 0 ; 0x158: 0x00000000
kfdhdb.ub4spare[24]: 0 ; 0x15c: 0x00000000
kfdhdb.ub4spare[25]: 0 ; 0x160: 0x00000000
kfdhdb.ub4spare[26]: 0 ; 0x164: 0x00000000
kfdhdb.ub4spare[27]: 0 ; 0x168: 0x00000000
kfdhdb.ub4spare[28]: 0 ; 0x16c: 0x00000000
kfdhdb.ub4spare[29]: 0 ; 0x170: 0x00000000
kfdhdb.ub4spare[30]: 0 ; 0x174: 0x00000000
kfdhdb.ub4spare[31]: 0 ; 0x178: 0x00000000
kfdhdb.ub4spare[32]: 0 ; 0x17c: 0x00000000
kfdhdb.ub4spare[33]: 0 ; 0x180: 0x00000000
kfdhdb.ub4spare[34]: 0 ; 0x184: 0x00000000
kfdhdb.ub4spare[35]: 0 ; 0x188: 0x00000000
kfdhdb.ub4spare[36]: 0 ; 0x18c: 0x00000000
kfdhdb.ub4spare[37]: 0 ; 0x190: 0x00000000
kfdhdb.ub4spare[38]: 0 ; 0x194: 0x00000000
kfdhdb.ub4spare[39]: 0 ; 0x198: 0x00000000
kfdhdb.ub4spare[40]: 0 ; 0x19c: 0x00000000
kfdhdb.ub4spare[41]: 0 ; 0x1a0: 0x00000000
kfdhdb.ub4spare[42]: 0 ; 0x1a4: 0x00000000
kfdhdb.ub4spare[43]: 0 ; 0x1a8: 0x00000000
kfdhdb.ub4spare[44]: 0 ; 0x1ac: 0x00000000
kfdhdb.ub4spare[45]: 0 ; 0x1b0: 0x00000000
kfdhdb.ub4spare[46]: 0 ; 0x1b4: 0x00000000
kfdhdb.ub4spare[47]: 0 ; 0x1b8: 0x00000000
kfdhdb.ub4spare[48]: 0 ; 0x1bc: 0x00000000
kfdhdb.ub4spare[49]: 0 ; 0x1c0: 0x00000000
kfdhdb.ub4spare[50]: 0 ; 0x1c4: 0x00000000
kfdhdb.ub4spare[51]: 0 ; 0x1c8: 0x00000000
kfdhdb.ub4spare[52]: 0 ; 0x1cc: 0x00000000
kfdhdb.ub4spare[53]: 0 ; 0x1d0: 0x00000000
kfdhdb.acdb.aba.seq: 0 ; 0x1d4: 0x00000000
kfdhdb.acdb.aba.blk: 0 ; 0x1d8: 0x00000000
kfdhdb.acdb.ents: 0 ; 0x1dc: 0x0000
kfdhdb.acdb.ub2spare: 0 ; 0x1de: 0x0000
--网上的替换 这些怎么那么随便...
[oracle@rac1 ~]$ kfed read /dev/oracleasm/disks/VOL1 > vol1.header
[oracle@rac1 ~]$ kfed read /dev/oracleasm/disks/VOL2 > vol2.header
[oracle@rac1 ~]$ diff vol1.header vol2.header
6,7c6,7
< kfbh.block.obj: 2147483648 ; 0x008: TYPE=0x8 NUMB=0x0
< kfbh.check: 1464188596 ; 0x00c: 0x5745beb4
---
> kfbh.block.obj: 2147483649 ; 0x008: TYPE=0x8 NUMB=0x1
> kfbh.check: 1413856918 ; 0x00c: 0x5445be96
12,13c12,13
< kfdhdb.driver.provstr: ORCLDISKVOL1 ; 0x000: length=12
< kfdhdb.driver.reserved[0]: 827084630 ; 0x008: 0x314c4f56
---
> kfdhdb.driver.provstr: ORCLDISKVOL2 ; 0x000: length=12
> kfdhdb.driver.reserved[0]: 843861846 ; 0x008: 0x324c4f56
20c20
< kfdhdb.dsknum: 0 ; 0x024: 0x0000
---
> kfdhdb.dsknum: 1 ; 0x024: 0x0001
23c23
< kfdhdb.dskname: VOL1 ; 0x028: length=4
---
> kfdhdb.dskname: VOL2 ; 0x028: length=4
25c25
< kfdhdb.fgname: VOL1 ; 0x068: length=4
---
> kfdhdb.fgname: VOL2 ; 0x068: length=4
39c39
< kfdhdb.f1b1locn: 2 ; 0x0d4: 0x00000002
---
> kfdhdb.f1b1locn: 0 ; 0x0d4: 0x00000000
49,50c49,50
< kfdhdb.spfile: 33 ; 0x0f4: 0x00000021
< kfdhdb.spfflg: 1 ; 0x0f8: 0x00000001
---
> kfdhdb.spfile: 0 ; 0x0f4: 0x00000000
> kfdhdb.spfflg: 0 ; 0x0f8: 0x00000000
--#########################################################################
--查找spfile的位置http://www.xifenfei.com/4071.html
[oracle@rac1 ~]$
[oracle@rac1 ~]$ kfed dev=/dev/oracleasm/disks/VOL2 op=READ|egrep "kfdhdb.sp|ausize"
kfdhdb.ausize: 1048576 ; 0x0bc: 0x00100000
kfdhdb.spfile: 0 ; 0x0f4: 0x00000000
kfdhdb.spfflg: 0 ; 0x0f8: 0x00000000
[oracle@rac1 ~]$ kfed dev=/dev/oracleasm/disks/VOL1 op=READ|egrep "kfdhdb.sp|ausize"
kfdhdb.ausize: 1048576 ; 0x0bc: 0x00100000
kfdhdb.spfile: 33 ; 0x0f4: 0x00000021
kfdhdb.spfflg: 1 ; 0x0f8: 0x00000001
--#########################################################################
3.使用kfed repair修改损坏asm disk header
rac1-> kfed repair ‘/dev/raw/raw1‘
rac1-> kfed read /dev/raw/raw1 blknum=0
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: T=0 NUMB=0x0
kfbh.block.obj: 2147483648 ; 0x008: TYPE=0x8 NUMB=0x0
kfbh.check: 883602253 ; 0x00c: 0x34aab34d
kfbh.fcn.base: 0 ; 0x010: 0x00000000
kfbh.fcn.wrap: 0 ; 0x014: 0x00000000
kfbh.spare1: 0 ; 0x018: 0x00000000
kfbh.spare2: 0 ; 0x01c: 0x00000000
--#########################################################################
4.使用kfed merge恢复asm disk header
rac1-> dd if=/dev/zero of=/dev/raw/raw1 bs=4096 count=1
1+0 records in
1+0 records out
rac1-> kfed read /dev/raw/raw1 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: T=0 NUMB=0x0
kfbh.block.obj: 0 ; 0x008: TYPE=0x0 NUMB=0x0
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
http://www.itpub.net/thread-1597605-1-1.html 具体信息参考这里:
[oracle@rac1 ~]$ kfod disk=all
--------------------------------------------------------------------------------
Disk Size Path User Group
================================================================================
1: 10236 Mb ORCL:VOL1 <unknown> <unknown>
2: 10236 Mb ORCL:VOL2 <unknown> <unknown>
--------------------------------------------------------------------------------
ORACLE_SID ORACLE_HOME
================================================================================
+ASM /orac/orahome/app/11.2.0/grid
[oracle@rac1 ~]$
oracle11g ASM磁盘组头部损坏修复(asm修复2)
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。