Tuesday, 5 May 2015

Oracle Kfed Utility to repair formatted asm disks

Error in Altering Data Group

ORA-15032: not all alterations performed
ORA-15040: diskgroup is incomplete
ORA-15042: ASM disk "13" is missing from group number "1" 


Problem Statement - Accidently formatted one of the member disk of the diskgroup using dd command
Impact - dd command formatted the disk thus losing the ASM header information and corrupting the whole diskgroup

Solution -

Repair the formatted disk with "kfed" utility provided by Oracle

cd $ORACLE_HOME/rdbms/lib
make -f ins* ikfed
$ORACLE_HOME/bin/kfed read /dev/rhdisk9
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: blk=0
kfbh.block.obj:                       0 ; 0x008: file=0
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
000000000 00000000 00000000 00000000 00000000  [................]
  Repeat 255 times
KFED-00322: Invalid content encountered during block traversal: [kfbtTraverseBlock][Invalid OSM block type][][0]


As you see disk /dev/rhdisk9 had issues since it was formatted. Now repair the disk using following command

$ORACLE_HOME/bin/kfed repair /dev/rhdisk9

Once it is done, you can mount the diskgroup and do the alterations on it.

No comments:

Post a Comment