rac和dg的目录不一样,都采用asm管理磁盘
控制文件备份/home/oracle/rman/control2ipl7sft_82_1 文件存在
[root@racdg1 ~]# su - oracle
[oracle@racdg1 ~]$ rman target sys/123456@racdg1 auxiliary /
Recovery Manager: Release 11.2.0.4.0 - Production on Thu Oct 16 21:44:14 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: GNNT (DBID=1162592830)
connected to auxiliary database: GNNT (not mounted)
RMAN> duplicate target database for standby;
Starting Duplicate Db at 16-OCT-14
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=760 device type=DISK
contents of Memory Script:
{
restore clone standby controlfile;
}
executing Memory Script
Starting restore at 16-OCT-14
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece /home/oracle/rman/control2ipl7sft_82_1
channel ORA_AUX_DISK_1: ORA-19870: error while restoring backup piece /home/oracle/rman/control2ipl7sft_82_1
ORA-19504: failed to create file "+DATADG01/dg01/controlfile/control01.ctl"
ORA-17502: ksfdcre:3 Failed to create file +DATADG01/dg01/controlfile/control01.ctl
ORA-15001: diskgroup "DATADG01" does not exist or is not mounted
ORA-15040: diskgroup is incomplete
ORA-15040: diskgroup is incomplete
[grid@racdg1 ~]$ asmcmd ls -l
State Type Rebal Name
MOUNTED NORMAL N DATADG01/
MOUNTED NORMAL N FRADG01/
[grid@racdg1 ~]$ id
uid=1100(grid) gid=1000(oinstall) 组=1000(oinstall),1020(asmadmin),1021(asmdba),1022(asmoper),1300(dba)
[root@racdg1 ~]# su - oracle
[oracle@racdg1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Oct 16 22:37:04 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> select name,type,state,total_mb,free_mb from v$asm_diskgroup;
NAME TYPE STATE TOTAL_MB FREE_MB
------------------------------ ------ ----------- ---------- ----------
DATADG01 NORMAL MOUNTED 40960 40840
FRADG01 NORMAL MOUNTED 40960 40854
[oracle@racdg1 ~]$ id
uid=1101(oracle) gid=1000(oinstall) 组=1000(oinstall),1021(asmdba),1300(dba),1301(oper)
[oracle@racdg1 rman]$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Thu Oct 16 23:26:13 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: GNNT (not mounted)
RMAN> restore controlfile from '/home/oracle/rman/control2ipl7sft_82_1';
Starting restore at 16-OCT-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1893 device type=DISK
channel ORA_DISK_1: restoring control file
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 10/16/2014 23:26:35
ORA-19870: error while restoring backup piece /home/oracle/rman/control2ipl7sft_82_1
ORA-19504: failed to create file "+DATADG01/dg01/controlfile/control01.ctl"
ORA-17502: ksfdcre:3 Failed to create file +DATADG01/dg01/controlfile/control01.ctl
ORA-15001: diskgroup "DATADG01" does not exist or is not mounted
ORA-15040: diskgroup is incomplete
ORA-15040: diskgroup is incomplet
ASMCMD> ls
ONLINELOG/
controlfile/
datafile/
tempfile/
ASMCMD> pwd
+DATADG01/dg01
ASMCMD> exit
[grid@racdg1 ~]$ ls -l /dev/asm*
brw-rw---- 1 grid asmadmin 8, 16 10月 16 23:30 /dev/asmdata01
brw-rw---- 1 grid asmadmin 8, 32 10月 16 23:30 /dev/asmdata02
brw-rw---- 1 grid asmadmin 8, 48 10月 16 23:30 /dev/asmfra01
brw-rw---- 1 grid asmadmin 8, 64 10月 16 23:30 /dev/asmfra02
[grid@racdg1 ~]$
杭州-share (630468705) 23:25:46
通过udev
杭州-share (630468705) 23:26:45
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="36000c29196640f0bb64cbb6a20333009", NAME="asmdata01", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="36000c29912bdf56b54e0da578f17b8ff", NAME="asmdata02", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="36000c29603fa50e5f0a5a0537fac7962", NAME="asmfra01", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="36000c2939990b39898c449f35ac1ef9c", NAME="asmfra02", OWNER="grid", GROUP="asmadmin", MODE="0660"
故障原因:
由于oracle用户无法访问asm disk 权限,导致restore失败,遇到类似情况,可以尝试dbca创建数据库测试,应该不会发现asm磁盘组
解决方法:二选一
1. 磁盘组所组修改为asmdba
2. oracle用户加上所属组asmadmin