Oracle KFED
The kfed like kfod, is one of those Oracle utilities that you may never need to use but it’s great to know it’s there if your ASM metadata becomes corrupt or just interested in the metadata structure.
If you have never used it and want to give it a try, you can find it in $GRID_HOME/bin/kfed
KDED help
$ kfed help=y as/mlib ASM Library [asmlib='lib'] aun/um AU number to examine or update [AUNUM=number] aus/z Allocation Unit size in bytes [AUSZ=number] blkn/um Block number to examine or update [BLKNUM=number] blks/z Metadata block size in bytes [BLKSZ=number] ch/ksum Update checksum before each write [CHKSUM=YES/NO] cn/t Count of AUs to process [CNT=number] de/v ASM device to examine or update [DEV=string] dm/pall Don't suppress repeated lines when dumping corrupt blocks [DMPALL=YES/NO] ds/klbl KFED Disk Label to stamp [dsklbl=string] fg/lbl KFED Failgroup Label to stamp [fglbl=string] fo/rce Force option to stamp the labels [force=YES|NO] o/p KFED operation type [OP=READ/WRITE/MERGE/REPAIR/NEW/FORM/FIND/STRUCT/STAMP] p/rovnm Name for provisioning purposes [PROVNM=string] se/ek AU number to seek to [SEEK=number] si/telbl KFED Site Label to stamp [sitelbl=string] te/xt File name for translated block text [TEXT=string] tr/ace Tracing [trace=YES|NO] ty/pe ASM metadata block type number [TYPE=number] verb Verbose execution [verbose=YES|NO] verlb/l KFED Label Version to stamp [verlbl=number]
Below I have highlighted some of the more interesting values and included a table of their meanings.
$ kfed read /dev/pureasm/dg_pstb_oradata 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: 1156265638 ; 0x00c: 0x44eb36a6 ... kfdhdb.driver.provstr: ORCLDISK ; 0x000: length=8 kfdhdb.compat: 301989888 ; 0x020: 0x12000000 kfdhdb.dsknum: 0 ; 0x024: 0x0000 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 ... kfdhdb.crestmp.hi: 33070960 ; 0x0a8: HOUR=0x10 DAYS=0x1b MNTH=0x7 YEAR=0x7e2 kfdhdb.crestmp.lo: 598415360 ; 0x0ac: USEC=0x0 MSEC=0x2c6 SECS=0x3a MINS=0x8 kfdhdb.mntstmp.hi: 33102539 ; 0x0b0: HOUR=0xb DAYS=0x16 MNTH=0x6 YEAR=0x7e4 kfdhdb.mntstmp.lo: 3599148032 ; 0x0b4: USEC=0x0 MSEC=0x1a9 SECS=0x28 MINS=0x35 kfdhdb.secsize: 512 ; 0x0b8: 0x0200 kfdhdb.blksize: 4096 ; 0x0ba: 0x1000 kfdhdb.ausize: 4194304 ; 0x0bc: 0x00400000 kfdhdb.mfact: 454272 ; 0x0c0: 0x0006ee80 kfdhdb.dsksize: 262144 ; 0x0c4: 0x00040000 ...
kfed read
ASM Block Header (kfbh)
Type | Value |
kfbh.endian | System Endianness – 0 Big Endian (Unix) 1 Little Endian (Linux & Windows) |
kfbh.type | ASM block type, KFBTYP_DISKHEAD = ASM disk header block |
kfbh.block.blk | ASM block number, ASM header should be zero. |
ASM Disk Header (kfdhdb)
Type | Value |
kfdhdb.driver.provstr | ORCLDISK+[ASM disk name] for ASMLIB and ASMFD disks. ORCLDISK for non-ASMLIB/ASMFD disks. |
kfdhdb.grptyp | Oracle ASM group type |
kfdhdb.hdrsts | Header status |
kfdhdb.dskname | Disk name in the disk group |
kfdhdb.grpname | Oracle ASM disk group name |
kfdhdb.fgname | Oracle ASM failure group name |
kfdhdb.secsize | Sector size (bytes) |
kfdhdb.blksize | Block size (bytes) |
kfdhdb.ausize | ASM allocation unit size (bytes) |
kfdhdb.dsksize | Disk size (bytes) |
Note, if you try to use kfed on a non-oracle device you will get an KEF-00322 error message.
KFED-00322: invalid content encountered during block traversal: [kfbtTraverseBlock][Invalid OSM block type]
[twitter-follow screen_name=’RonEkins’ show_count=’yes’]