这个工具默认是没有编译的,需要手工编译
cd $ORACLE_HOME/rdbms/lib
make -f ins_rdbms.mk ikfed
make -f ins_rdbms.mk ikfed
使用kfed dump出裸设备头信息,还是比较容易看懂对应的内容的
kfed read /dev/raw/raw41 text=raw41.out
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: 2147483679 ; 0x008: TYPE=0x8 NUMB=0x1f
kfbh.check: 2468443330 ; 0x00c: 0x932174c2
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: ORCLDISK ; 0x000: length=8
kfdhdb.driver.reserved[0]: 0 ; 0x008: 0x00000000
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: 168820736 ; 0x020: 0x0a100000
kfdhdb.dsknum: 31 ; 0x024: 0x001f
kfdhdb.grptyp: 1 ; 0x026: KFDGTP_EXTERNAL
kfdhdb.hdrsts: 3 ; 0x027: KFDHDR_MEMBER
kfdhdb.dskname: DWDATA_0031 ; 0x028: length=11
kfdhdb.grpname: DWDATA ; 0x048: length=6
kfdhdb.fgname: DWDATA_0031 ; 0x068: length=11
kfdhdb.capname: ; 0x088: length=0
kfdhdb.crestmp.hi: 32890253 ; 0x0a8: HOUR=0xd DAYS=0xc MNTH=0x7 YEAR=0x7d7
kfdhdb.crestmp.lo: 3664138240 ; 0x0ac: USEC=0x0 MSEC=0x194 SECS=0x26 MINS=0x36
kfdhdb.mntstmp.hi: 32901235 ; 0x0b0: HOUR=0x13 DAYS=0x3 MNTH=0x2 YEAR=0x7d8
kfdhdb.mntstmp.lo: 1186200576 ; 0x0b4: USEC=0x0 MSEC=0xff SECS=0x2b MINS=0x11
kfdhdb.secsize: 512 ; 0x0b8: 0x0200
kfdhdb.blksize: 4096 ; 0x0ba: 0x1000
kfdhdb.ausize: 1048576 ; 0x0bc: 0x00100000
kfdhdb.mfact: 113792 ; 0x0c0: 0x0001bc80
kfdhdb.dsksize: 273708 ; 0x0c4: 0x00042d2c
kfdhdb.pmcnt: 4 ; 0x0c8: 0x00000004
kfdhdb.fstlocn: 1 ; 0x0cc: 0x00000001
kfdhdb.altlocn: 2 ; 0x0d0: 0x00000002
kfdhdb.f1b1locn: 0 ; 0x0d4: 0x00000000
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: 32890253 ; 0x0e4: HOUR=0xd DAYS=0xc MNTH=0x7 YEAR=0x7d7
kfdhdb.grpstmp.lo: 3661876224 ; 0x0e8: USEC=0x0 MSEC=0xf3 SECS=0x24 MINS=0x36
kfdhdb.ub4spare[0]: 0 ; 0x0ec: 0x00000000
...
kfdhdb.ub4spare[57]: 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
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: 2147483679 ; 0x008: TYPE=0x8 NUMB=0x1f
kfbh.check: 2468443330 ; 0x00c: 0x932174c2
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: ORCLDISK ; 0x000: length=8
kfdhdb.driver.reserved[0]: 0 ; 0x008: 0x00000000
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: 168820736 ; 0x020: 0x0a100000
kfdhdb.dsknum: 31 ; 0x024: 0x001f
kfdhdb.grptyp: 1 ; 0x026: KFDGTP_EXTERNAL
kfdhdb.hdrsts: 3 ; 0x027: KFDHDR_MEMBER
kfdhdb.dskname: DWDATA_0031 ; 0x028: length=11
kfdhdb.grpname: DWDATA ; 0x048: length=6
kfdhdb.fgname: DWDATA_0031 ; 0x068: length=11
kfdhdb.capname: ; 0x088: length=0
kfdhdb.crestmp.hi: 32890253 ; 0x0a8: HOUR=0xd DAYS=0xc MNTH=0x7 YEAR=0x7d7
kfdhdb.crestmp.lo: 3664138240 ; 0x0ac: USEC=0x0 MSEC=0x194 SECS=0x26 MINS=0x36
kfdhdb.mntstmp.hi: 32901235 ; 0x0b0: HOUR=0x13 DAYS=0x3 MNTH=0x2 YEAR=0x7d8
kfdhdb.mntstmp.lo: 1186200576 ; 0x0b4: USEC=0x0 MSEC=0xff SECS=0x2b MINS=0x11
kfdhdb.secsize: 512 ; 0x0b8: 0x0200
kfdhdb.blksize: 4096 ; 0x0ba: 0x1000
kfdhdb.ausize: 1048576 ; 0x0bc: 0x00100000
kfdhdb.mfact: 113792 ; 0x0c0: 0x0001bc80
kfdhdb.dsksize: 273708 ; 0x0c4: 0x00042d2c
kfdhdb.pmcnt: 4 ; 0x0c8: 0x00000004
kfdhdb.fstlocn: 1 ; 0x0cc: 0x00000001
kfdhdb.altlocn: 2 ; 0x0d0: 0x00000002
kfdhdb.f1b1locn: 0 ; 0x0d4: 0x00000000
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: 32890253 ; 0x0e4: HOUR=0xd DAYS=0xc MNTH=0x7 YEAR=0x7d7
kfdhdb.grpstmp.lo: 3661876224 ; 0x0e8: USEC=0x0 MSEC=0xf3 SECS=0x24 MINS=0x36
kfdhdb.ub4spare[0]: 0 ; 0x0ec: 0x00000000
...
kfdhdb.ub4spare[57]: 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
下面是一个损坏了的disk的结果
kfbh.endian: 83 ; 0x000: 0x53
kfbh.hard: 0 ; 0x001: 0x00
kfbh.type: 0 ; 0x002: KFBTYP_INVALID
kfbh.datfmt: 0 ; 0x003: 0x00
kfbh.block.blk: 4294967293 ; 0x004: T=1 NUMB=0x7ffffffd
kfbh.block.obj: 65286 ; 0x008: TYPE=0x0 NUMB=0xff06
kfbh.check: 144 ; 0x00c: 0x00000090
kfbh.fcn.base: 136903976 ; 0x010: 0x0828fd28
kfbh.fcn.wrap: 4294953840 ; 0x014: 0xffffcb70
kfbh.spare1: 136905029 ; 0x018: 0x08290145
kfbh.spare2: 30000 ; 0x01c: 0x00007530
kfbh.hard: 0 ; 0x001: 0x00
kfbh.type: 0 ; 0x002: KFBTYP_INVALID
kfbh.datfmt: 0 ; 0x003: 0x00
kfbh.block.blk: 4294967293 ; 0x004: T=1 NUMB=0x7ffffffd
kfbh.block.obj: 65286 ; 0x008: TYPE=0x0 NUMB=0xff06
kfbh.check: 144 ; 0x00c: 0x00000090
kfbh.fcn.base: 136903976 ; 0x010: 0x0828fd28
kfbh.fcn.wrap: 4294953840 ; 0x014: 0xffffcb70
kfbh.spare1: 136905029 ; 0x018: 0x08290145
kfbh.spare2: 30000 ; 0x01c: 0x00007530
- SQL> select disk_number,name,total_mb,header_status from v$asm_disk
- 2 ;
-
- DISK_NUMBER NAME TOTAL_MB HEADER_STATU
- ----------- ------------------------------ ---------- ------------
- 0 DATA_0000 15259 UNKNOWN
- [oracle@node1 lib]$ kfed read /dev/raw/raw2 text=/u01/app/oracle/raw2.out
- [oracle@node1 lib]$ less /u01/app/oracle/raw2.out
- kfbh.endian: 0 ; 0x000: 0x00
- kfbh.hard: 34 ; 0x001: 0x22
- kfbh.type: 0 ; 0x002: KFBTYP_INVALID
- kfbh.datfmt: 0 ; 0x003: 0x00
- kfbh.block.blk: 4290772992 ; 0x004: T=1 NUMB=0x7fc00000
- kfbh.block.obj: 0 ; 0x008: TYPE=0x0 NUMB=0x0
- kfbh.check: 0 ; 0x00c: 0x00000000
- kfbh.fcn.base: 9756 ; 0x010: 0x0000261c
- kfbh.fcn.wrap: 512 ; 0x014: 0x00000200
- kfbh.spare1: 393183 ; 0x018: 0x0005ffdf
- kfbh.spare2: 2054913149 ; 0x01c: 0x7a7b7c7d