Analysing Oracle ASM metadata with KFED

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]
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)

kfbh.endianSystem Endianness – 0 Big Endian (Unix) 1 Little Endian (Linux & Windows)
kfbh.typeASM block type, KFBTYP_DISKHEAD  = ASM disk header block
kfbh.block.blkASM block number, ASM header should be zero.
ASM Block Header

ASM Disk Header (kfdhdb)

kfdhdb.driver.provstrORCLDISK+[ASM disk name] for ASMLIB and ASMFD disks. 
kfdhdb.grptypOracle ASM group type
kfdhdb.hdrstsHeader status
kfdhdb.dsknameDisk name in the disk group
kfdhdb.grpnameOracle ASM disk group name
kfdhdb.fgnameOracle ASM failure group name
kfdhdb.secsizeSector size (bytes)
kfdhdb.blksizeBlock size (bytes)
kfdhdb.ausizeASM allocation unit size (bytes)
kfdhdb.dsksizeDisk size (bytes)
ASM Disk Header

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’]

One thought on “Analysing Oracle ASM metadata with KFED

Add yours

Leave a Reply

Create a website or blog at

Up ↑

%d bloggers like this: