故障总结:
ASM实例:
卸载磁盘组
alter diskgroup dismount;
加载磁盘组
alter diskgroup mount;
在数据库启动时会改变DB用到的diskgroup的状态为CONNECTED,
那些没有用到的diskgroup的状态仍然为MOUNTED.
$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.4.0 - Production on Mon Jun 29 13:34:55 2009
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select name,state from v$asm_diskgroup_stat;
NAME STATE
------------------------------ -----------
DG1 MOUNTED
DG2 MOUNTED
SQL> create tablespace test datafile '+DG1' size 2g;
Tablespace created.
---在DG1创建一个表空间后状态变为CONNECTED,而DG2仍然为MOUNTED
SQL> select name,state from v$asm_diskgroup_stat;
NAME STATE
------------------------------ -----------
DG1 CONNECTED
DG2 MOUNTED
SQL>
结合上次故障分析
经过分析报警日志发现DB有将+DG_DATA_03中所有的datafile进行offline的记录,
故DB在启动时不会检查+DG_DATA_03的datafile,因此也无法将状态改为CONNECTED。
而当我们执行rman copy的时候触发了DB 连接 +DG_DATA_03,此时状态变为CONNECTED了。
ORA-01115: IO error reading block from file 125 (block # 58254)
ORA-01110: data file 125: '+DG_DATA_03/billbj/datafile/phoenix_default.304.679315039'
ORA-15078: ASM diskgroup was forcibly dismounted
Thu Jun 25 06:10:31 2009
Trace dumping is performing id=[cdmp_20090625061031]
Thu Jun 25 06:10:41 2009
KCF: write/open error block=0xce0db online=1
file=148 +DG_DATA_03/billbj/datafile/tbs_band_table_20.256.654268217
error=15081 txt: ''
Automatic datafile offline due to write error on
file 148: +DG_DATA_03/billbj/datafile/tbs_band_table_20.256.654268217
KCF: write/open error block=0x72b online=1
file=21 +DG_DATA_03/billbj/datafile/tbs_default_idx_20.265.654273237
error=15078 txt: ''
Automatic datafile offline due to write error on
file 21: +DG_DATA_03/billbj/datafile/tbs_default_idx_20.265.654273237
KCF: write/open error block=0x4c6e9 online=1
file=50 +DG_DATA_03/billbj/datafile/tbs_band_dailytable_20.270.656595577
error=15078 txt: ''
Automatic datafile offline due to write error on
file 50: +DG_DATA_03/billbj/datafile/tbs_band_dailytable_20.270.656595577
KCF: write/open error block=0x42ab9 online=1
file=57 +DG_DATA_03/billbj/datafile/tbs_band_dailytable_20.273.656599591
error=15078 txt: ''
。。。。。。。
$ ./rman target/
Recovery Manager: Release 10.2.0.4.0 - Production on Mon Jun 29 16:01:16 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: ASMDB (DBID=435008571)
RMAN> backup as copy datafile 5 format '/home/oracle/1.dbf';
Starting backup at 29-JUN-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=153 devtype=DISK
channel ORA_DISK_1: starting datafile copy
input datafile fno=00005 name=+DG2/asmdb/datafile/test2.256.690822953
output filename=/home/oracle/1.dbf tag=TAG20090629T160247 recid=1 stamp=690825820
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:55
Finished backup at 29-JUN-09
RMAN> backup as copy datafile 5 format '+DG1';
Starting backup at 29-JUN-09
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile fno=00005 name=+DG2/asmdb/datafile/test2.256.690822953
output filename=+DG1/asmdb/datafile/test2.274.690826445 tag=TAG20090629T161404 recid=2 stamp=690826485
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:45
Finished backup at 29-JUN-09
RMAN> switch datafile 5 to copy;
datafile 5 switched to datafile copy "+DG1/asmdb/datafile/test2.274.690826445"
RMAN>