Tuesday 19 February 2013

KFED , KFOD AMDU for ASM


KFED


kfed can be used to read and write ASM metadata. In particular disk headers and ASM (hidden) metadata files.

note: kfed in write mode is a powerful but potentially dangerous tool

# displays online help for the utility

$ kfed -help

# reads the disk header to stdout

 $ kfed op=read dev=/dev/emcpowera1

# reads the specified AU and block into file /tmp/test

$ kfed op=read dev=/dev/emcpowera1 aunum=3 blknum=3 text=/tmp/test

# writes from /tmp/test into the specified AU and block

#block checksum is computed and written together with data
$ kfed op=write dev=/dev/emcpowera1 aunum=3 blknum=3 text=/tmp/test


KFOD
Help
$kfod -h

Disk sizes
$kfod a='/dev/emcp*'

Disk Group sizes
$kfod op=group








AMDU


Allows to dump ASM contents without opening diskgroups, allows to check ASM file mirroring when using normal redundancy

powerful tool for troubleshooting, introduced in 11g, usable in 10g too.
amdu run creates a directory with a report.tx file and the .map (and .img dump files (for metadata nad data, output dependson switches in the commandline )
    a few examples of interest:

# displays online help for the utility

$ amdu -help 

# extracts file 111 from ASM diskgroup TEST4_DATADG1

# Note: works as asmcmd cp but olso on dismounted disk groups!
$ amdu -dis '/dev/emcpowera1' -extract TEST4_DATADG1.111

# compares primary and mirror extents in normal redundancy disk groups

# Useful to check for potential corruption issues
# results in the report.txt file
$ amdu -dis '/dev/emcpowera1' -compare -extract TEST4_DATADG1.111 -noextract

# dump contents of a given diskgroup and does not create image file

# the .map file reports on all files found (column number 5 prefixed by the letter F)
$ amdu -dis '/dev/emcpowera1' -noimage -dump TEST4_DATADG1

# print 10 blocks for the first extent of file 111

$ amdu -dis '/dev/emcpowera1' -print TEST4_DATADG1.F111.X1.B1.C10

No comments:

Post a Comment