sitemap

RSS地图

收藏本站

设为首页

Oracle研究中心

当前位置:Oracle研究中心 > 故障案例 >

【案例】Oracle报错ORA-15054 asm diskgroup无法mount的解决办法

时间:2016-12-16 10:49   来源:Oracle研究中心   作者:网络   点击:

天萃荷净 Oracle研究中心案例分析:运维DBA反映在10204 rac(asm)在添加disk时,ctrl+C中断后导致diskgroup无法mount并报错ORA-15054。

本站文章除注明转载外,均为本站原创: 转载自love wife & love life —Roger 的Oracle技术博客
本文链接地址: asm 添加disk时,ctrl+C导致diskgroup无法mount

一套10204 rac(asm)在添加disk时,ctrl+C中断后导致diskgroup无法mount,今天通过vmware进行模拟了一下,然后给出解决方法,供大家参考。

—-如下来模拟添加asm disk时,中断操作导致asm 磁盘组无法mount的情况

SQL> SHOW parameter disk

NAME                                 TYPE   VALUE
------------------------------------ ------ ------------------------------
asm_diskgroups                       string DATA1
asm_diskstring                       string /dev/sdb, /dev/sde, /dev/sdd,
                                            /dev/sdc
disk_asynch_io                       boolea TRUE
                                     
SQL> SELECT path FROM v$asm_disk WHERE group_number=1;

PATH
--------------------
/dev/sdd
/dev/sdc

SQL>  ALTER diskgroup data1 ADD disk '/dev/sdb','/dev/sde' rebalance POWER 0;
ALTER diskgroup data1 ADD disk '/dev/sdb','/dev/sde' rebalance POWER 0
*
ERROR at line 1:
ORA-01013: USER requested cancel OF CURRENT operation


SQL> ----过几秒就ctrl+C
果然此时数据库实例crash了,如下:

[oracle@10gasm ~]$ ps -ef|grep pmon
oracle    4176     1  0 03:47          00:00:00 asm_pmon_+ASM
oracle   27813 10014  0 08:30 pts/2    00:00:00 grep pmon

[oracle@10gasm ~]$ cd /home/oracle/admin/test/bdump/
[oracle@10gasm bdump]$ tail -50 alert_test.log
ASMB started with pid=16, OS id=27628
Starting background process RBAL
RBAL started with pid=17, OS id=27632
Sat Dec 22 08:25:29 2012
SUCCESS: diskgroup DATA1 was mounted
Sat Dec 22 08:25:34 2012
Setting recovery target incarnation to 2
Sat Dec 22 08:25:34 2012
Successful mount of redo thread 1, with mount id 2100867564
Sat Dec 22 08:25:34 2012
Database mounted in Exclusive Mode
Completed: ALTER DATABASE   MOUNT
Sat Dec 22 08:25:34 2012
ALTER DATABASE OPEN
Sat Dec 22 08:25:34 2012
Thread 1 opened at log sequence 2
  Current log# 1 seq# 2 mem# 0: +DATA1/test/onlinelog/group_1.261.802678553
Successful open of redo thread 1
Sat Dec 22 08:25:34 2012
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Sat Dec 22 08:25:34 2012
SMON: enabling cache recovery
Sat Dec 22 08:25:35 2012
Successfully onlined Undo Tablespace 1.
Sat Dec 22 08:25:35 2012
SMON: enabling tx recovery
Sat Dec 22 08:25:36 2012
Database Characterset is ZHS16GBK
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
QMNC started with pid=21, OS id=27657
Sat Dec 22 08:25:43 2012
Completed: ALTER DATABASE OPEN
Sat Dec 22 08:29:37 2012
SUCCESS: diskgroup DATA1 was dismounted
SUCCESS: diskgroup DATA1 was dismounted
Sat Dec 22 08:29:39 2012
Errors in file /home/oracle/admin/test/bdump/test_ckpt_27611.trc:
ORA-00206: error in writing (block 3, # blocks 1) of control file
ORA-00202: control file: '+DATA1/test/controlfile/current.260.802678553'
ORA-15078: ASM diskgroup was forcibly dismounted
Sat Dec 22 08:29:39 2012
Errors in file /home/oracle/admin/test/bdump/test_ckpt_27611.trc:
ORA-00221: error on write to control file
ORA-00206: error in writing (block 3, # blocks 1) of control file
ORA-00202: control file: '+DATA1/test/controlfile/current.260.802678553'
ORA-15078: ASM diskgroup was forcibly dismounted
Sat Dec 22 08:29:39 2012
CKPT: terminating instance due to error 221
Instance terminated by CKPT, pid = 27611

如果尝试把这些disk删除或者重新添加,都会报错,类似如下:

SQL> alter diskgroup data1 drop disk '/dev/sdb','/dev/sde';
alter diskgroup data1 drop disk '/dev/sdb','/dev/sde'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15054: disk "/DEV/SDE" does not exist in diskgroup "DATA1"
ORA-15054: disk "/DEV/SDB" does not exist in diskgroup "DATA1"

发现不行了,只能先把disk header清空掉,重启asm实例,尝试通过重建新的磁盘组然后drop的方式去删除:

[oracle@10gasm ~]$ dd if=/dev/zero of=/dev/sdb bs=4096 count=1
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 0.000317152 seconds, 12.9 MB/s

[oracle@10gasm ~]$ dd if=/dev/zero of=/dev/sde bs=4096 count=1
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 9.9421e-05 seconds, 41.2 MB/s

SQL> shutdown immediate
ASM diskgroups dismounted
ASM instance shutdown

SQL> startup
ASM instance started

Total System Global Area   83886080 bytes
Fixed Size                  1217836 bytes
Variable Size              57502420 bytes
ASM Cache                  25165824 bytes
ORA-15032: not all alterations performed
ORA-15040: diskgroup is incomplete
ORA-15042: ASM disk "3" is missing
ORA-15042: ASM disk "2" is missing

SQL> create diskgroup data2 external redundancy  disk '/dev/sde','/dev/sdb';
Diskgroup created.

SQL> drop diskgroup data2;
Diskgroup dropped.

SQL> alter diskgroup data mount;
alter diskgroup data mount
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15063: ASM discovered an insufficient number of disks for diskgroup "DATA"


此时仍然无法mount,昨天操作骚扰熊哥,提到了pst和disk directory等信息,可以已经包含了这些disk,所以这里我想到,既然如此,那么可以通过来修改这部分内容,然后成功将diskgroup mount,如下是的操作过程:

下面我们来看下asm的pst信息中是否包我们新加的2个disk:

[oracle@10gasm ~]$ kfed read /dev/sdd aun=1 | more
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                           17 ; 0x002: KFBTYP_PST_META
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                     256 ; 0x004: T=0 NUMB=0x100
kfbh.block.obj:              2147483648 ; 0x008: TYPE=0x8 NUMB=0x0
kfbh.check:                  4116287946 ; 0x00c: 0xf55991ca
kfbh.fcn.base:                        0 ; 0x010: 0x00000000
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kfdpHdrB.time.hi:              32977608 ; 0x000: HOUR=0x8 DAYS=0x16 MNTH=0xc YEAR=0x7dc
kfdpHdrB.time.lo:            1975197696 ; 0x004: USEC=0x0 MSEC=0x2c8 SECS=0x1b MINS=0x1d
kfdpHdrB.last:                        3 ; 0x008: 0x00000003
kfdpHdrB.next:                        3 ; 0x00c: 0x00000003
kfdpHdrB.copyCnt:                     1 ; 0x010: 0x01
kfdpHdrB.ub1spare:                    0 ; 0x011: 0x00
kfdpHdrB.ub2spare:                    0 ; 0x012: 0x0000
kfdpHdrB.incarn:                      0 ; 0x014: 0x00000000
kfdpHdrB.copy[0]:                     0 ; 0x018: 0x0000
kfdpHdrB.copy[1]:                     0 ; 0x01a: 0x0000
kfdpHdrB.copy[2]:                     0 ; 0x01c: 0x0000
kfdpHdrB.copy[3]:                     0 ; 0x01e: 0x0000
kfdpHdrB.copy[4]:                     0 ; 0x020: 0x0000
kfdpHdrB.dtaSz:                       4 ; 0x022: 0x0004   --包含4个disk,说明新加的2个已经包含在里面了
ub1[0]:                               2 ; 0x024: 0x02
.....省略部分内容

下面再来看下asm disk directory信息:

[oracle@10gasm ~]$ kfed read /dev/sdc aun=2 blkn=0|grep dsknum
kfddde[0].dsknum:                     0 ; 0x034: 0x0000
kfddde[1].dsknum:                     1 ; 0x1f4: 0x0001
kfddde[2].dsknum:                     2 ; 0x3b4: 0x0002
kfddde[3].dsknum:                     3 ; 0x574: 0x0003
kfddde[4].dsknum:                     0 ; 0x734: 0x0000
kfddde[5].dsknum:                     0 ; 0x8f4: 0x0000
kfddde[6].dsknum:                     0 ; 0xab4: 0x0000
kfddde[7].dsknum:                     0 ; 0xc74: 0x0000

仍然可以看到,disk directory中也有新加的disk的信息了。 这里我们要做的就是把多余的disk清理掉:

kfed read /dev/sdc aun=2 blkn=0 > sdc.txt
将kfddde[2].dsknum,kfddde[3].dsknum 修改为0即可,另外还必须修改如下的地方,将多余的disk的信息全部改为0:

这里是diskgroup中正常的盘,/dev/sdc,起disknum为1,对于对于的盘disknum为2,3,下面信息你都行进行处理。

kfddde[1].entry.incarn:               1 ; 0x1e4: A=1 NUMM=0x0
kfddde[1].entry.hash:                 1 ; 0x1e8: 0x00000001
kfddde[1].entry.refer.number:4294967295 ; 0x1ec: 0xffffffff
kfddde[1].entry.refer.incarn:         0 ; 0x1f0: A=0 NUMM=0x0
kfddde[1].dsknum:                     1 ; 0x1f4: 0x0001
kfddde[1].state:                      2 ; 0x1f6: KFDSTA_NORMAL
kfddde[1].ub1spare:                   0 ; 0x1f7: 0x00
kfddde[1].dskname:           DATA1_0001 ; 0x1f8: length=10
kfddde[1].fgname:            DATA1_0001 ; 0x218: length=10
kfddde[1].crestmp.hi:          32977478 ; 0x238: HOUR=0x6 DAYS=0x12 MNTH=0xc YEAR=0x7dc
kfddde[1].crestmp.lo:        2407340032 ; 0x23c: USEC=0x0 MSEC=0x346 SECS=0x37 MINS=0x23
kfddde[1].failstmp.hi:                0 ; 0x240: HOUR=0x0 DAYS=0x0 MNTH=0x0 YEAR=0x0
kfddde[1].failstmp.lo:                0 ; 0x244: USEC=0x0 MSEC=0x0 SECS=0x0 MINS=0x0
kfddde[1].timer:                      0 ; 0x248: 0x00000000
kfddde[1].size:                    1024 ; 0x24c: 0x00000400
kfddde[1].spare[0]:                   0 ; 0x250: 0x00000000
kfddde[1].spare[1]:                   0 ; 0x254: 0x00000000
kfddde[1].spare[2]:                   0 ; 0x258: 0x00000000
kfddde[1].spare[3]:                   0 ; 0x25c: 0x00000000
kfddde[1].spare[4]:                   0 ; 0x260: 0x00000000
kfddde[1].zones[0].start:             0 ; 0x264: 0x00000000
kfddde[1].zones[0].size:           1024 ; 0x268: 0x00000400
kfddde[1].zones[0].used:            503 ; 0x26c: 0x000001f7
kfddde[1].zones[0].spare:             0 ; 0x270: 0x00000000
kfddde[1].zones[0].classes[0].imbal[0]:501 ; 0x274: 0x000001f5

修改完成之后,再使用kfed merge回去,如下:
kfed merge /dev/sdc aun=2 text=sdc.txt

下面是关于pst的信息修改:

[oracle@10gasm ~]$ kfed read /dev/sdd aun=1 > sdd.txt
[oracle@10gasm ~]$ vi sdd.txt

kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                           17 ; 0x002: KFBTYP_PST_META
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                     256 ; 0x004: T=0 NUMB=0x100
kfbh.block.obj:              2147483648 ; 0x008: TYPE=0x8 NUMB=0x0
kfbh.check:                  4116287946 ; 0x00c: 0xf55991ca
kfbh.fcn.base:                        0 ; 0x010: 0x00000000
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kfdpHdrB.time.hi:              32977608 ; 0x000: HOUR=0x8 DAYS=0x16 MNTH=0xc YEAR=0x7dc
kfdpHdrB.time.lo:            1975197696 ; 0x004: USEC=0x0 MSEC=0x2c8 SECS=0x1b MINS=0x1d
kfdpHdrB.last:                        3 ; 0x008: 0x00000003
kfdpHdrB.next:                        3 ; 0x00c: 0x00000003
kfdpHdrB.copyCnt:                     1 ; 0x010: 0x01
kfdpHdrB.ub1spare:                    0 ; 0x011: 0x00
kfdpHdrB.ub2spare:                    0 ; 0x012: 0x0000
kfdpHdrB.incarn:                      0 ; 0x014: 0x00000000
kfdpHdrB.copy[0]:                     0 ; 0x018: 0x0000
kfdpHdrB.copy[1]:                     0 ; 0x01a: 0x0000
kfdpHdrB.copy[2]:                     0 ; 0x01c: 0x0000
kfdpHdrB.copy[3]:                     0 ; 0x01e: 0x0000
kfdpHdrB.copy[4]:                     0 ; 0x020: 0x0000
kfdpHdrB.dtaSz:                       2 ; 0x022: 0x0002
ub1[0]:                               2 ; 0x024: 0x02
ub1[1]:                               0 ; 0x025: 0x00
.........

[oracle@10gasm ~]$ cat sdd.txt |grep kfdpHdrB.dtaSz
kfdpHdrB.dtaSz:                       2 ; 0x022: 0x0002
[oracle@10gasm ~]$ kfed merge /dev/sdd text=sdd.txt
[oracle@10gasm ~]$

分别修复了如下几个地方:
kfdpHdrB.last:                        1 ; 0x008: 0x00000001
kfdpHdrB.next:                        1 ; 0x00c: 0x00000001
kfdpHdrB.dtaSz:                       2 ; 0x022: 0x0002
当然,这里你修改一个block是不行的,asm通常会用好几个block去存pst信息,我这里其实还merge了blkn 1,2,3等几个pst block,最后成功mount磁盘组。

SQL> alter diskgroup data1 mount;
Diskgroup altered.

此时asm alert 信息如下:
SQL> alter diskgroup data1 mount
Sat Dec 22 22:23:45 2012
NOTE: cache registered group DATA1 number=1 incarn=0x1c5e7683
Sat Dec 22 22:23:45 2012
NOTE: Hbeat: instance first (grp 1)
Sat Dec 22 22:23:51 2012
NOTE: start heartbeating (grp 1)
NOTE: cache opening disk 0 of grp 1: DATA1_0000 path:/dev/sdd
Sat Dec 22 22:23:51 2012
NOTE: F1X0 found on disk 0 fcn 0.0
NOTE: cache opening disk 1 of grp 1: DATA1_0001 path:/dev/sdc
NOTE: cache mounting (first) group 1/0x1C5E7683 (DATA1)
NOTE: cache recovered group 1 to fcn 0.2032
Sat Dec 22 22:23:51 2012
NOTE: opening chunk 1 at fcn 0.2032 ABA
NOTE: seq=5 blk=117
Sat Dec 22 22:23:51 2012
NOTE: cache mounting group 1/0x1C5E7683 (DATA1) succeeded
SUCCESS: diskgroup DATA1 was mounted
Sat Dec 22 22:23:53 2012
NOTE: recovering COD for group 1/0x1c5e7683 (DATA1)
SUCCESS: completed COD recovery for group 1/0x1c5e7683 (DATA1)

最后我们再将前面失败的几个disk添加到asm diskgroup中,如下:

SQL> alter diskgroup data1 add disk '/dev/sdb','/dev/sde' rebalance power 0;
Diskgroup altered.

此时的alert log信息如下:
Sat Dec 22 23:44:41 2012

SQL> alter diskgroup data1 add disk '/dev/sdb','/dev/sde' rebalance power 0
Sat Dec 22 23:44:41 2012
NOTE: initializing header on grp 1 disk DATA1_0002
NOTE: initializing header on grp 1 disk DATA1_0003
NOTE: cache opening disk 2 of grp 1: DATA1_0002 path:/dev/sdb
NOTE: cache opening disk 3 of grp 1: DATA1_0003 path:/dev/sde
NOTE: PST update: grp = 1
NOTE: requesting all-instance disk validation for group=1
Sat Dec 22 23:44:41 2012
NOTE: disk validation pending for group 1/0x1c5e7683 (DATA1)
SUCCESS: validated disks for 1/0x1c5e7683 (DATA1)
Sat Dec 22 23:44:44 2012
NOTE: PST update: grp = 1
NOTE: requesting all-instance PST refresh for group=1
Sat Dec 22 23:44:44 2012
NOTE: PST refresh pending for group 1/0x1c5e7683 (DATA1)
SUCCESS: refreshed PST for 1/0x1c5e7683 (DATA1)
Sat Dec 22 23:44:47 2012
NOTE: requesting all-instance PST refresh for group=1
Sat Dec 22 23:44:47 2012
NOTE: PST refresh pending for group 1/0x1c5e7683 (DATA1)
SUCCESS: refreshed PST for 1/0x1c5e7683 (DATA1)

通过alert log,其实我们也可以清楚的看到,在添加disk的过程中,其实主要需要做如下几个步骤:

1. 初始化disk header block
2. 更新pst。

当然,这里其实还涉及到其他的操作,另外如果是开启了rebalance操作,后还有rebalance的信息。

当然,如果你不想通过上面方式去做,可以直接使用oracle自带的amdu去抽取文件,不过这里需要说明的是,在很多情况下,甚至disk header损坏的情况下,可能amdu都是不行的。你可以借助ODU去操作。 下面来详细描述如何用amdu去抽取datafile以及其他文件。

—首先需要找到asm alias信息

[oracle@10gasm ~]$ kfed  read /dev/sdd aun=2 blkn=6|grep au|more
kfffde[0].xptr.au:                   26 ; 0x4a0: 0x0000001a
kfffde[1].xptr.au:           4294967295 ; 0x4a8: 0xffffffff
kfffde[2].xptr.au:           4294967295 ; 0x4b0: 0xffffffff

[oracle@10gasm ~]$ kfed  read /dev/sdd aun=26 blkn=1|more
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                           11 ; 0x002: KFBTYP_ALIASDIR
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                       1 ; 0x004: T=0 NUMB=0x1
kfbh.block.obj:                       6 ; 0x008: TYPE=0x0 NUMB=0x6
kfbh.check:                  1090379337 ; 0x00c: 0x40fdde49
kfbh.fcn.base:                     1995 ; 0x010: 0x000007cb
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kffdnd.bnode.incarn:                  1 ; 0x000: A=1 NUMM=0x0
kffdnd.bnode.frlist.number:  4294967295 ; 0x004: 0xffffffff
kffdnd.bnode.frlist.incarn:           0 ; 0x008: A=0 NUMM=0x0
kffdnd.overfl.number:        4294967295 ; 0x00c: 0xffffffff
kffdnd.overfl.incarn:                 0 ; 0x010: A=0 NUMM=0x0
kffdnd.parent.number:                 0 ; 0x014: 0x00000000
kffdnd.parent.incarn:                 1 ; 0x018: A=1 NUMM=0x0
kffdnd.fstblk.number:                 1 ; 0x01c: 0x00000001
kffdnd.fstblk.incarn:                 1 ; 0x020: A=1 NUMM=0x0
kfade[0].entry.incarn:                1 ; 0x024: A=1 NUMM=0x0
kfade[0].entry.hash:          710518681 ; 0x028: 0x2a59a799
kfade[0].entry.refer.number:          2 ; 0x02c: 0x00000002
kfade[0].entry.refer.incarn:          1 ; 0x030: A=1 NUMM=0x0
kfade[0].name:                 DATAFILE ; 0x034: length=8
kfade[0].fnum:               4294967295 ; 0x064: 0xffffffff
kfade[0].finc:               429496729Oracleoracleplus.net5 ; 0x068: 0xffffffff
kfade[0].flags:                       4 ; 0x06c: U=0 S=0 S=1 U=0 F=0
kfade[0].ub1spare:                    0 ; 0x06d: 0x00
kfade[0].ub2spare:                    0 ; 0x06e: 0x0000
kfade[1].entry.incarn:                3 ; 0x070: A=1 NUMM=0x1
kfade[1].entry.hash:         4053320104 ; 0x074: 0xf198c1a8
kfade[1].entry.refer.number:          3 ; 0x078: 0x00000003
kfade[1].entry.refer.incarn:          3 ; 0x07c: A=1 NUMM=0x1
kfade[1].name:              CONTROLFILE ; 0x080: length=11
kfade[1].fnum:               4294967295 ; 0x0b0: 0xffffffff
kfade[1].finc:               4294967295 ; 0x0b4: 0xffffffff
kfade[1].flags:                       4 ; 0x0b8: U=0 S=0 S=1 U=0 F=0
kfade[1].ub1spare:                    0 ; 0x0b9: 0x00
kfade[1].ub2spare:                    0 ; 0x0ba: 0x0000
kfade[2].entry.incarn:                1 ; 0x0bc: A=1 NUMM=0x0
kfade[2].entry.hash:         2803485489 ; 0x0c0: 0xa719cb31
kfade[2].entry.refer.number:          4 ; 0x0c4: 0x00000004
kfade[2].entry.refer.incarn:          1 ; 0x0c8: A=1 NUMM=0x0
kfade[2].name:                ONLINELOG ; 0x0cc: length=9
kfade[2].fnum:               4294967295 ; 0x0fc: 0xffffffff
kfade[2].finc:               4294967295 ; 0x100: 0xffffffff
kfade[2].flags:                       4 ; 0x104: U=0 S=0 S=1 U=0 F=0
kfade[2].ub1spare:                    0 ; 0x105: 0x00
kfade[2].ub2spare:                    0 ; 0x106: 0x0000
kfade[3].entry.incarn:                1 ; 0x108: A=1 NUMM=0x0
kfade[3].entry.hash:         2905271101 ; 0x10c: 0xad2aeb3d
kfade[3].entry.refer.number:          5 ; 0x110: 0x00000005
kfade[3].entry.refer.incarn:          1 ; 0x114: A=1 NUMM=0x0
kfade[3].name:                 TEMPFILE ; 0x118: length=8
kfade[3].fnum:               4294967295 ; 0x148: 0xffffffff
kfade[3].finc:               4294967295 ; 0x14c: 0xffffffff
kfade[3].flags:                       4 ; 0x150: U=0 S=0 S=1 U=0 F=0
kfade[3].ub1spare:                    0 ; 0x151: 0x00
kfade[3].ub2spare:                    0 ; 0x152: 0x0000
kfade[4].entry.incarn:                1 ; 0x154: A=1 NUMM=0x0
kfade[4].entry.hash:         3261836913 ; 0x158: 0xc26bae71
kfade[4].entry.refer.number:          6 ; 0x15c: 0x00000006
kfade[4].entry.refer.incarn:          1 ; 0x160: A=1 NUMM=0x0
kfade[4].name:            PARAMETERFILE ; 0x164: length=13
kfade[4].fnum:               4294967295 ; 0x194: 0xffffffff
kfade[4].finc:               4294967295 ; 0x198: 0xffffffff
kfade[4].flags:                       4 ; 0x19c: U=0 S=0 S=1 U=0 F=0
kfade[4].ub1spare:                    0 ; 0x19d: 0x00
kfade[4].ub2spare:                    0 ; 0x19e: 0x0000
kfade[5].entry.incarn:                1 ; 0x1a0: A=1 NUMM=0x0
kfade[5].entry.hash:         2892671843 ; 0x1a4: 0xac6aab63
kfade[5].entry.refer.number: 4294967295 ; 0x1a8: 0xffffffff
kfade[5].entry.refer.incarn:          0 ; 0x1ac: A=0 NUMM=0x0
kfade[5].name:           spfiletest.ora ; 0x1b0: length=14
kfade[5].fnum:                      265 ; 0x1e0: 0x00000109
kfade[5].finc:                802678613 ; 0x1e4: 0x2fd7e755
kfade[5].flags:                      17 ; 0x1e8: U=1 S=0 S=0 U=0 F=1
kfade[5].ub1spare:                    0 ; 0x1e9: 0x00
kfade[5].ub2spare:                    0 ; 0x1ea: 0x0000
....省略部分内容
datafile在最前面,说明在第2个block,如下:

[oracle@10gasm ~]$ kfed  read /dev/sdd aun=26 blkn=2|more
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                           11 ; 0x002: KFBTYP_ALIASDIR
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                       2 ; 0x004: T=0 NUMB=0x2
kfbh.block.obj:                       6 ; 0x008: TYPE=0x0 NUMB=0x6
kfbh.check:                   892835323 ; 0x00c: 0x353795fb
kfbh.fcn.base:                     1599 ; 0x010: 0x0000063f
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kffdnd.bnode.incarn:                  1 ; 0x000: A=1 NUMM=0x0
kffdnd.bnode.frlist.number:  4294967295 ; 0x004: 0xffffffff
kffdnd.bnode.frlist.incarn:           0 ; 0x008: A=0 NUMM=0x0
kffdnd.overfl.number:        4294967295 ; 0x00c: 0xffffffff
kffdnd.overfl.incarn:                 0 ; 0x010: A=0 NUMM=0x0
kffdnd.parent.number:                 1 ; 0x014: 0x00000001
kffdnd.parent.incarn:                 1 ; 0x018: A=1 NUMM=0x0
kffdnd.fstblk.number:                 2 ; 0x01c: 0x00000002
kffdnd.fstblk.incarn:                 1 ; 0x020: A=1 NUMM=0x0
kfade[0].entry.incarn:                1 ; 0x024: A=1 NUMM=0x0
kfade[0].entry.hash:         1251413818 ; 0x028: 0x4a970f3a
kfade[0].entry.refer.number: 4294967295 ; 0x02c: 0xffffffff
kfade[0].entry.refer.incarn:          0 ; 0x030: A=0 NUMM=0x0
kfade[0].name:                   SYSTEM ; 0x034: length=6
kfade[0].fnum:                      256 ; 0x064: 0x00000100
kfade[0].finc:                802678453 ; 0x068: 0x2fd7e6b5
kfade[0].flags:                      18 ; 0x06c: U=0 S=1 S=0 U=0 F=1
kfade[0].ub1spare:                    0 ; 0x06d: 0x00
kfade[0].ub2spare:                    0 ; 0x06e: 0x0000
kfade[1].entry.incarn:                1 ; 0x070: A=1 NUMM=0x0
kfade[1].entry.hash:         1356948434 ; 0x074: 0x50e163d2
kfade[1].entry.refer.number: 4294967295 ; 0x078: 0xffffffff
kfade[1].entry.refer.incarn:          0 ; 0x07c: A=0 NUMM=0x0
kfade[1].name:                   SYSAUX ; 0x080: length=6
kfade[1].fnum:                      257 ; 0x0b0: 0x00000101
kfade[1].finc:                802678455 ; 0x0b4: 0x2fd7e6b7
kfade[1].flags:                      18 ; 0x0b8: U=0 S=1 S=0 U=0 F=1
kfade[1].ub1spare:                    0 ; 0x0b9: 0x00
kfade[1].ub2spare:                    0 ; 0x0ba: 0x0000
kfade[2].entry.incarn:                1 ; 0x0bc: A=1 NUMM=0x0
kfade[2].entry.hash:          495364582 ; 0x0c0: 0x1d86a9e6
kfade[2].entry.refer.number: 4294967295 ; 0x0c4: 0xffffffff
kfade[2].entry.refer.incarn:          0 ; 0x0c8: A=0 NUMM=0x0
kfade[2].name:                 UNDOTBS1 ; 0x0cc: length=8
kfade[2].fnum:                      258 ; 0x0fc: 0x00000102
.....省略部分内容

定位到asm file number号:
[oracle@10gasm ~]$ kfed  read /dev/sdd aun=26 blkn=2|grep fnum | more
kfade[0].fnum:                      256 ; 0x064: 0x00000100
kfade[1].fnum:                      257 ; 0x0b0: 0x00000101
kfade[2].fnum:                      258 ; 0x0fc: 0x00000102
kfade[3].fnum:                      259 ; 0x148: 0x00000103
kfade[4].fnum:                        0 ; 0x194: 0x00000000
kfade[5].fnum:                        0 ; 0x1e0: 0x00000000
......
接着我们来看controlfile:

[oracle@10gasm ~]$ kfed  read /dev/sdd aun=26 blkn=3|more
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                           11 ; 0x002: KFBTYP_ALIASDIR
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                       3 ; 0x004: T=0 NUMB=0x3
kfbh.block.obj:                       6 ; 0x008: TYPE=0x0 NUMB=0x6
kfbh.check:                   363349019 ; 0x00c: 0x15a8441b
kfbh.fcn.base:                     1683 ; 0x010: 0x00000693
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kffdnd.bnode.incarn:                  3 ; 0x000: A=1 NUMM=0x1
kffdnd.bnode.frlist.number:  4294967295 ; 0x004: 0xffffffff
kffdnd.bnode.frlist.incarn:           0 ; 0x008: A=0 NUMM=0x0
kffdnd.overfl.number:        4294967295 ; 0x00c: 0xffffffff
kffdnd.overfl.incarn:                 0 ; 0x010: A=0 NUMM=0x0
kffdnd.parent.number:                 1 ; 0x014: 0x00000001
kffdnd.parent.incarn:                 1 ; 0x018: A=1 NUMM=0x0
kffdnd.fstblk.number:                 3 ; 0x01c: 0x00000003
kffdnd.fstblk.incarn:                 3 ; 0x020: A=1 NUMM=0x1
kfade[0].entry.incarn:                3 ; 0x024: A=1 NUMM=0x1
kfade[0].entry.hash:         3062743642 ; 0x028: 0xb68dc25a
kfade[0].entry.refer.number: 4294967295 ; 0x02c: 0xffffffff
kfade[0].entry.refer.incarn:          0 ; 0x030: A=0 NUMM=0x0
kfade[0].name:                  Current ; 0x034: length=7
kfade[0].fnum:                      260 ; 0x064: 0x00000104
kfade[0].finc:                802678553 ; 0x068: 0x2fd7e719
kfade[0].flags:                      18 ; 0x06c: U=0 S=1 S=0 U=0 F=1
.... 省略部分内容
下面是redo logfile的信息:

[oracle@10gasm ~]$ kfed  read /dev/sdd aun=26 blkn=4|more
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                           11 ; 0x002: KFBTYP_ALIASDIR
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                       4 ; 0x004: T=0 NUMB=0x4
kfbh.block.obj:                       6 ; 0x008: TYPE=0x0 NUMB=0x6
kfbh.check:                  1826975500 ; 0x00c: 0x6ce56f0c
kfbh.fcn.base:                     1887 ; 0x010: 0x0000075f
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kffdnd.bnode.incarn:                  1 ; 0x000: A=1 NUMM=0x0
kffdnd.bnode.frlist.number:  4294967295 ; 0x004: 0xffffffff
kffdnd.bnode.frlist.incarn:           0 ; 0x008: A=0 NUMM=0x0
kffdnd.overfl.number:        4294967295 ; 0x00c: 0xffffffff
kffdnd.overfl.incarn:                 0 ; 0x010: A=0 NUMM=0x0
kffdnd.parent.number:                 1 ; 0x014: 0x00000001
kffdnd.parent.incarn:                 1 ; 0x018: A=1 NUMM=0x0
kffdnd.fstblk.number:                 4 ; 0x01c: 0x00000004
kffdnd.fstblk.incarn:                 1 ; 0x020: A=1 NUMM=0x0
kfade[0].entry.incarn:                1 ; 0x024: A=1 NUMM=0x0
kfade[0].entry.hash:         2031796096 ; 0x028: 0x791abf80
kfade[0].entry.refer.number: 4294967295 ; 0x02c: 0xffffffff
kfade[0].entry.refer.incarn:          0 ; 0x030: A=0 NUMM=0x0
kfade[0].name:                  group_1 ; 0x034: length=7
kfade[0].fnum:                      261 ; 0x064: 0x00000105
kfade[0].finc:                802678553 ; 0x068: 0x2fd7e719
kfade[0].flags:                      18 ; 0x06c: U=0 S=1 S=0 U=0 F=1
kfade[0].ub1spare:                    0 ; 0x06d: 0x00
kfade[0].ub2spare:                    0 ; 0x06e: 0x0000
kfade[1].entry.incarn:                1 ; 0x070: A=1 NUMM=0x0
kfade[1].entry.hash:          392836082 ; 0x074: 0x176a33f2
kfade[1].entry.refer.number: 4294967295 ; 0x078: 0xffffffff
kfade[1].entry.refer.incarn:          0 ; 0x07c: A=0 NUMM=0x0
kfade[1].name:                  group_2 ; 0x080: length=7
kfade[1].fnum:                      262 ; 0x0b0: 0x00000106
kfade[1].finc:                802678555 ; 0x0b4: 0x2fd7e71b
kfade[1].flags:                      18 ; 0x0b8: U=0 S=1 S=0 U=0 F=1
kfade[1].ub1spare:                    0 ; 0x0b9: 0x00
kfade[1].ub2spare:                    0 ; 0x0ba: 0x0000
kfade[2].entry.incarn:                1 ; 0x0bc: A=1 NUMM=0x0
kfade[2].entry.hash:         2800308934 ; 0x0c0: 0xa6e952c6
kfade[2].entry.refer.number: 4294967295 ; 0x0c4: 0xffffffff
kfade[2].entry.refer.incarn:          0 ; 0x0c8: A=0 NUMM=0x0
kfade[2].name:                  group_3 ; 0x0cc: length=7
kfade[2].fnum:                      263 ; 0x0fc: 0x00000107
kfade[2].finc:                802678557 ; 0x100: 0x2fd7e71d
kfade[2].flags:                      18 ; 0x104: U=0 S=1 S=0 U=0 F=1
kfade[2].ub1spare:                    0 ; 0x105: 0x00
kfade[2].ub2spare:                    0 ; 0x106: 0x0000
kfade[3].entry.incarn:                0 ; 0x108: A=0 NUMM=0x0
kfade[3].entry.hash:                  0 ; 0x10c: 0x00000000
kfade[3].entry.refer.number:          0 ; 0x110: 0x00000000
kfade[3].entry.refer.incarn:          0 ; 0x114: A=0 NUMM=0x0
kfade[3].name:                          ; 0x118: length=0
.........
tempfile我们就不管了,你可以把库拉起来了新建就行了,最后来看下spfile:

[oracle@10gasm ~]$ kfed  read /dev/sdd aun=26 blkn=6|more
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                           11 ; 0x002: KFBTYP_ALIASDIR
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                       6 ; 0x004: T=0 NUMB=0x6
kfbh.block.obj:                       6 ; 0x008: TYPE=0x0 NUMB=0x6
kfbh.check:                  3446176149 ; 0x00c: 0xcd687995
kfbh.fcn.base:                     1994 ; 0x010: 0x000007ca
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kffdnd.bnode.incarn:                  1 ; 0x000: A=1 NUMM=0x0
kffdnd.bnode.frlist.number:  4294967295 ; 0x004: 0xffffffff
kffdnd.bnode.frlist.incarn:           0 ; 0x008: A=0 NUMM=0x0
kffdnd.overfl.number:        4294967295 ; 0x00c: 0xffffffff
kffdnd.overfl.incarn:                 0 ; 0x010: A=0 NUMM=0x0
kffdnd.parent.number:                 1 ; 0x014: 0x00000001
kffdnd.parent.incarn:                 1 ; 0x018: A=1 NUMM=0x0
kffdnd.fstblk.number:                 6 ; 0x01c: 0x00000006
kffdnd.fstblk.incarn:                 1 ; 0x020: A=1 NUMM=0x0
kfade[0].entry.incarn:                1 ; 0x024: A=1 NUMM=0x0
kfade[0].entry.hash:         1965945079 ; 0x028: 0x752df0f7
kfade[0].entry.refer.number: 4294967295 ; 0x02c: 0xffffffff
kfade[0].entry.refer.incarn:          0 ; 0x030: A=0 NUMM=0x0
kfade[0].name:                   spfile ; 0x034: length=6
kfade[0].fnum:                      265 ; 0x064: 0x00000109
kfade[0].finc:                802678613 ; 0x068: 0x2fd7e755
kfade[0].flags:                      18 ; 0x06c: U=0 S=1 S=0 U=0 F=1
kfade[0].ub1spare:                    0 ; 0x06d: 0x00
kfade[0].ub2spare:                    0 ; 0x06e: 0x0000
..........
下面开始抽取的简单命令,过程补贴了最后加上结果:

--extrace spfile
amdu -dis '/dev/sd*' -extract data1.265 -output spfile.ora

--extrace controlfile

amdu -dis '/dev/sd*' -nodir -norep -extract data1.260 -output control01.ctl

--extract datafile
amdu -dis '/dev/sd*' -nodir -norep -extract data1.256 -output system01.dbf
amdu -dis '/dev/sd*' -nodir -norep -extract data1.257 -output sysaux01.dbf
amdu -dis '/dev/sd*' -nodir -norep -extract data1.258 -output undotbs01.dbf
amdu -dis '/dev/sd*' -nodir -norep -extract data1.259 -output users01.dbf

--extract redo logfile

amdu -dis '/dev/sd*' -nodir -norep -extract data1.261 -output redo01.log
amdu -dis '/dev/sd*' -nodir -norep -extract data1.262 -output redo02.log
amdu -dis '/dev/sd*' -nodir -norep -extract data1.263 -output redo03.log

最后我们来看看amdu所抽取出来的文件:
[oracle@10gasm amdu_2012_12_22_23_22_52]$ ls -ltr
total 878236
-rw-r--r-- 1 oracle oinstall      2560 Dec 22 23:26 spfile.ora
-rw-r--r-- 1 oracle oinstall   7061504 Dec 22 23:27 control01.ctl
-rw-r--r-- 1 oracle oinstall  52429312 Dec 22 23:28 redo01.log
-rw-r--r-- 1 oracle oinstall  52429312 Dec 22 23:28 redo02.log
-rw-r--r-- 1 oracle oinstall 503324672 Dec 22 23:29 system01.dbf
-rw-r--r-- 1 oracle oinstall 251666432 Dec 22 23:30 sysaux01.dbf
-rw-r--r-- 1 oracle oinstall  26222592 Dec 22 23:31 undotbs01.dbf
-rw-r--r-- 1 oracle oinstall   5251072 Dec 22 23:31 users01.dbf
最后你可以通过dbv来检测一下所抽取的文件是否完好:


[oracle@10gasm amdu_2012_12_22_23_22_52]$ dbv file=system01.dbf

DBVERIFY: Release 10.2.0.1.0 - Production on Sat Dec 22 23:33:52 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
DBVERIFY - Verification starting : FILE = system01.dbf
DBVERIFY - Verification complete
Total Pages Examined         : 61440
Total Pages Processed (Data) : 36222
Total Pages Failing   (Data) : 0
Total Pages Processed (Index): 6767
Total Pages Failing   (Index): 0
Total Pages Processed (Other): 1775
Total Pages Processed (Seg)  : 0
Total Pages Failing   (Seg)  : 0
Total Pages Empty            : 16676
Total Pages Marked Corrupt   : 0
Total Pages Influx           : 0
Highest block SCN            : 475652 (0.475652)
[oracle@10gasm amdu_2012_12_22_23_22_52]$ dbv file=sysaux01.dbf

DBVERIFY: Release 10.2.0.1.0 - Production on Sat Dec 22 23:34:08 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
DBVERIFY - Verification starting : FILE = sysaux01.dbf
DBVERIFY - Verification complete
Total Pages Examined         : 30720
Total Pages Processed (Data) : 2252
Total Pages Failing   (Data) : 0
Total Pages Processed (Index): 2127
Total Pages Failing   (Index): 0
Total Pages Processed (Other): 14035
Total Pages Processed (Seg)  : 0
Total Pages Failing   (Seg)  : 0
Total Pages Empty            : 12306
Total Pages Marked Corrupt   : 0
Total Pages Influx           : 0
Highest block SCN            : 475379 (0.475379)

[oracle@10gasm amdu_2012_12_22_23_22_52]$ dbv file=users01.dbf

DBVERIFY: Release 10.2.0.1.0 - Production on Sat Dec 22 23:34:25 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
DBVERIFY - Verification starting : FILE = users01.dbf
DBVERIFY - Verification complete
Total Pages Examined         : 640
Total Pages Processed (Data) : 15
Total Pages Failing   (Data) : 0
Total Pages Processed (Index): 2
Total Pages Failing   (Index): 0
Total Pages Processed (Other): 26
Total Pages Processed (Seg)  : 0
Total Pages Failing   (Seg)  : 0
Total Pages Empty            : 597
Total Pages Marked Corrupt   : 0
Total Pages Influx           : 0
Highest block SCN            : 442362 (0.442362)

[oracle@10gasm amdu_2012_12_22_23_22_52]$ dbv file=undotbs01.dbf

DBVERIFY: Release 10.2.0.1.0 - Production on Sat Dec 22 23:34:33 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
DBVERIFY - Verification starting : FILE = undotbs01.dbf
DBVERIFY - Verification complete
Total Pages Examined         : 3200
Total Pages Processed (Data) : 0
Total Pages Failing   (Data) : 0
Total Pages Processed (Index): 0
Total Pages Failing   (Index): 0
Total Pages Processed (Other): 2444
Total Pages Processed (Seg)  : 0
Total Pages Failing   (Seg)  : 0
Total Pages Empty            : 756
Total Pages Marked Corrupt   : 0
Total Pages Influx           : 0
Highest block SCN            : 475650 (0.475650)
[oracle@10gasm amdu_2012_12_22_23_22_52]$

补充: 从11gR1开始,操作根本不需要这样操作了,从11.2.0.3开始,甚至还可以直接force drop disk和force mount diskgroup。

--------------------------------------ORACLE-DBA----------------------------------------

最权威、专业的Oracle案例资源汇总之【案例】Oracle报错ORA-15054 asm diskgroup无法mount的解决办法

本文由大师惜分飞原创分享,网址:http://www.oracleplus.net/arch/1405.html

Oracle研究中心

关键词:

10gR2 rac asm diskgroup not mount

ORA-15054解决办法

Oracle ASM无法挂载