Oracle兵器谱上古神器之-KFED(八)

2014-11-24 14:22:47 · 作者: · 浏览: 19
bh.type: 0 ; 0x002: KFBTYP_INVALID
kfbh.datfmt: 0 ; 0x003: 0x00
kfbh.block.blk: 0 ; 0x004: T=0 NUMB=0x0
kfbh.block.obj: 0 ; 0x008: TYPE=0x0 NUMB=0x0
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
然后启动ASM:
[oracle@gtser1 lib]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.5.0 - Production on Sat Mar 2 17:08:20 2013
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup
ASM instance started
Total System Global Area 125829120 bytes
Fixed Size 2094512 bytes
Variable Size 98568784 bytes
ASM Cache 25165824 bytes
ORA-15032: not all alterations performed
ORA-15063: ASM discovered an insufficient number of disks for diskgroup
"DATA01"
SQL>
正如预期的DG data01 mount失败,我们也可以在alter日志看到:
Sat Mar 02 17:08:28 CST 2013
SQL> ALTER DISKGROUP ALL MOUNT
Sat Mar 02 17:08:28 CST 2013
NOTE: cache registered group DATA01 number=1 incarn=0x7af2d794
NOTE: cache registered group FRA number=2 incarn=0x7b02d795
Sat Mar 02 17:08:28 CST 2013
ERROR: no PST quorum in group 1: required 1, found 0
Sat Mar 02 17:08:28 CST 2013
NOTE: cache dismounting group 1/0x7AF2D794 (DATA01)
NOTE: dbwr not being msg'd to dismount
ERROR: diskgroup DATA01 was not mounted
Sat Mar 02 17:08:28 CST 2013
NOTE: Hbeat: instance first (grp 2)
Sat Mar 02 17:08:33 CST 2013
NOTE: start heartbeating (grp 2)
NOTE: cache opening disk 0 of grp 2: D3 path:/dev/raw/raw3
Sat Mar 02 17:08:33 CST 2013
NOTE: F1X0 found on disk 0 fcn 0.0
NOTE: cache opening disk 1 of grp 2: D4 path:/dev/raw/raw4
NOTE: cache mounting (first) group 2/0x7B02D795 (FRA)
NOTE: cache recovered group 2 to fcn 0.3474
Sat Mar 02 17:08:33 CST 2013
NOTE: LGWR attempting to mount thread 1 for disk group 2
NOTE: LGWR mounted thread 1 for disk group 2
NOTE: opening chunk 1 at fcn 0.3474 ABA
NOTE: seq=18 blk=796
Sat Mar 02 17:08:33 CST 2013
NOTE: cache mounting group 2/0x7B02D795 (FRA) succeeded
SUCCESS: diskgroup FRA was mounted
Sat Mar 02 17:08:34 CST 2013
NOTE: recovering COD for group 2/0x7b02d795 (FRA)
SUCCESS: completed COD recovery for group 2/0x7b02d795 (FRA)
显示的也是磁盘组data01无法mount,通过asmcmd查看也是如此:
[oracle@gtser1 lib]$ asmcmd lsdg
State Type Rebal Unbal Sector Block AU Total_MB Free_MB
Req_mir_free_MB Usable_file_MB Offline_disks Name
DISMOUNTED N N 512 4096 1048576 0 0
0 0 0 DATA01/
MOUNTED EXTERN N N 512 4096 1048576 2048
1964 0 1964 0 FRA/
4. KFED恢复header信息
接下来我们就用510位置的备份还原:
[oracle@gtser1 lib]$ kfed write /dev/raw/raw1 te=/tmp/raw1.head.bak
[oracle@gtser1 lib]$ kfed read /dev/raw/raw1 te=/tmp/raw1.head.new
[oracle@gtser1 lib]$ cat /tmp/raw1.head.new|grep kfbh.type
kfbh.type: 1 ; 0x002: KFBTYP_DISKHEAD
[oracle@gtser1 lib]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.5.0 - Production on Sat Mar 2 17:12:58 2013
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracl