Using kfed/dd to repair ASM disk header corruption

Understanding ASM disk layout

Read ASM disk header block from  AU[0]
[root@grac41 Desktop]# kfed read  /dev/asm_test_1G_disk1 | egrep 'name|size|type'
kfbh.type:                            1 ; 0x002: KFBTYP_DISKHEAD   <-- ASM disk header
kfdhdb.dskname:               TEST_0000 ; 0x028: length=9          <-- ASM disk name
kfdhdb.grpname:                    TEST ; 0x048: length=4          <-- ASM DG name
kfdhdb.fgname:                TEST_0000 ; 0x068: length=9          <-- ASM Failgroup
kfdhdb.capname:                         ; 0x088: length=0
kfdhdb.secsize:                     512 ; 0x0b8: 0x0200            <-- Disk sector size   
kfdhdb.blksize:                    4096 ; 0x0ba: 0x1000            <-- ASM block size
kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000        <-- AU size : 1 Mbyte 
kfdhdb.dsksize:                    1023 ; 0x0c4: 0x000003ff        <-- ASM disk size : 1 GByte  

Check ASM block types for the first 2 AUs 
AU[0] :
[root@grac41 Desktop]# kfed find /dev/asm_test_1G_disk1
Block 0 has type 1
Block 1 has type 2
Block 2 has type 3
Block 3 has type 3
Block 4 has type 3
Block 5 has type 3
Block 6 has type 3
Block 7 has type 3
Block 8 has type 3
Block 9 has type 3
Block 10 has type 3
..
Block 252 has type 3
Block 253 has type 3
Block 254 has type 3
Block 255 has type 3

AU[1] :
[root@grac41 Desktop]#  kfed find /dev/asm_test_1G_disk1 aun=1
Block 256 has type 17
Block 257 has type 17
Block 258 has type 13
Block 259 has type 18
Block 260 has type 13
..
Block 508 has type 13
Block 509 has type 13
Block 510 has type 1
Block 511 has type 19

Summary :
--> Disk header size is 512 bytes 
    AU size = 1Mbyte  --> AU block size = 4096 
    This translates to 1048576 / 4096 = 256 blocks to read an AU ( start with block 0 - 255 )
    Block 510 and block 0 storing an ASM disk header ( == type 1 )

Run the kfed command below if you interested in a certain ASM block type ( use output from kfed find to the type info )
[root@grac41 Desktop]#  kfed read  /dev/asm_test_1G_disk1 aun=1 blkn=255  | egrep 'type'
kfbh.type:                           19 ; 0x002: KFBTYP_HBEAT

Some ASM block types 
[root@grac41 Desktop]# kfed read  /dev/asm_test_1G_disk1 aun=0 blkn=0  | egrep 'type' 
kfbh.type:                            1 ; 0x002: KFBTYP_DISKHEAD
kfbh.type:                            2 ; 0x002: KFBTYP_FREESPC
kfbh.type:                            3 ; 0x002: KFBTYP_ALLOCTBL
kfbh.type:                            5 ; 0x002: KFBTYP_LISTHEAD
kfbh.type:                           13 ; 0x002: KFBTYP_PST_NONE
kfbh.type:                           18 ; 0x002: KFBTYP_PST_DTA
kfbh.type:                           19 ; 0x002: KFBTYP_HBEAT

4 thoughts on “Using kfed/dd to repair ASM disk header corruption”

  1. Howdy fantastic blog! Does running a blog such as this take a great deal of work? I have absolutely no knowledge of programming but I was hoping to start my own blog in the near future. Anyways, should you have any ideas or tips for new blog owners please share. I understand this is off topic nevertheless I simply had to ask. Kudos!

    1. Ok- you need some time to understand the basic of blogging.
      Having some understanding of CSS, PHP would be helpfull too.
      But Workpress ( I’m using 4.1 ) should help you to start quickly.
      If you use my menu MISC -> Workpress Details
      you can find out my styles.css changes done compared to the original Twenty Twelve Theme

Leave a Reply

Your email address will not be published. Required fields are marked *