首先注意我们是不推荐用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.
如果自己搞不定可以找诗檀软件专业ORACLE数据库修复团队成员帮您恢复!
诗檀软件专业数据库修复团队
服务热线 : 13764045638 QQ号:47079569 邮箱:service@parnassusdata.com
Comment