【Oracle ASMデータリカバリ】oracleasm deletediskに削除されたASM Diskをどうやってリカバリできるか

プロのOracle Databaseの復旧サービスを提供
携帯番号: +86 13764045638 メール:[email protected]

まず、asmlibを使うことを勧めない。具体的な原因はWhy ASMLIB and why not?に参考してください。

 

けどasmlibを使った場合に、ユーザーがoracleasm deletediskの誤操作でASM Diskの asmlibマックを削除したら、以下の方法でリカバリできる:

  1. backup database using RMAN
  2. dismount the active Disk group
    3. Create KFED following ‘unpublished’ Note 284646.1 Creating and using the kfed utility to view ASM disk header 4. Follow same note to perform kfed read on the affected disk headers.
    5. Examine the output to verify that the header appears similar to the following:

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: T=0 NUMB=0x0
kfbh.block.obj: 2147483648 ; 0x008: TYPE=0x8 NUMB=0x0 kfbh.check: 3808867501 ; 0x00c: 0xe306b4ad kfbh.fcn.base: 1463 ; 0x010: 0x000005b7
kfbh.fcn.wrap: 0 ; 0x014: 0x00000000
kfbh.spare1: 0 ; 0x018: 0x00000000
kfbh.spare2: 0 ; 0x01c: 0x00000000
kfdhdb.driver.provstr: ORCLCLRD ; 0x000: length=8 kfdhdb.driver.reserved[0]: 0 ; 0x008: 0x00000000 kfdhdb.driver.reserved[1]: 0 ; 0x00c: 0x00000000 kfdhdb.driver.reserved[2]: 0 ; 0x010: 0x00000000 kfdhdb.driver.reserved[3]: 0 ; 0x014: 0x00000000

The value ORCLCLRD is set after using /etc/init.d/oracleasm deletedisk 6. Assuming that kfbh.type = KFBTYP_DISKHEAD

and that kfdhdb.driver.provstr: = ORCLCLRD
for each disk this operation will be successful.
7. kfed read <device name> > fix.txt
8. Edit fix.txt to change only ORCLCLRD to ORCLDISK 9. kfed merge <device name> text=fix.txt
10. etc/init.d/oracleasm listdisk
11. etc/init.d/oracleasm force-renamedisk

This command requires 2 arguments the first is the full path to the disk the second is the LABEL that will be stamped on the disk.

 


Posted

in

by

Tags:

Comments

Leave a Reply

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