问题描述:在Exadata迁移中使用的DG被直接用asmcmd从asm中rm掉了所有datafile.但是最后的一级目录无法删除,并且影响到了其他实例.在rm hang之后 diskgroup无法添加任何文件.原来的实例的所有add datafile drop directory操作均被hang住

[grid@dm02db01 ~]$ crsctl query crs softwareversion
Oracle Clusterware version on node [dm02db01] is [11.2.0.3.0]

SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE	11.2.0.3.0	Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production


[root@dm02cel01 ~]# imageinfo 

Kernel version: 2.6.18-274.18.1.0.1.el5 #1 SMP Thu Feb 9 19:07:16 EST 2012 x86_64
Cell version: OSS_11.2.3.1.0_LINUX.X64_120304
Cell rpm version: cell-11.2.3.1.0_LINUX.X64_120304-1

Active image version: 11.2.3.1.0.120304
Active image activated: 2012-05-07 02:04:12 -0700
Active image status: success
Active system partition on device: /dev/md5
Active software partition on device: /dev/md7

In partition rollback: Impossible

Cell boot usb partition: /dev/sdm1
Cell boot usb version: 11.2.3.1.0.120304

Inactive image version: undefined
Rollback to the inactive partitions: Impossible

ASMCMD> ls -l
Type Redund Striped Time Sys Name
Y YHDLOG/
Y EDWT/

ASMCMD> ls -l +data_dm02/edwt
Type Redund Striped Time Sys Name
Y DATAFILE/
Y ONLINELOG/

do this command:

ASMCMD> rm -rf edwt/
ORA-15032: not all alterations performed
ORA-15177: cannot operate on system aliases (DBD ERROR: OCIStmtExecute)

ERROR: alter diskgroup DATA_DM02 drop directory  '+DATA_DM02/edwt' FORCE
Thu Sep 20 17:12:06 2012
SQL> /* ASMCMD */alter diskgroup /*ASMCMD*/ "DATA_DM02" drop directory '+DATA_DM02/edwt/DATAFILE'
ORA-15032: not all alterations performed
ORA-15177: cannot operate on system aliases
ERROR: /* ASMCMD */alter diskgroup /*ASMCMD*/ "DATA_DM02" drop directory '+DATA_DM02/edwt/DATAFILE'
Thu Sep 20 17:12:22 2012
SQL> /* ASMCMD */alter diskgroup /*ASMCMD*/ "DATA_DM02" drop directory '+DATA_DM02/edwt/DATAFILE'
ORA-15032: not all alterations performed
ORA-15177: cannot operate on system aliases
ERROR: /* ASMCMD */alter diskgroup /*ASMCMD*/ "DATA_DM02" drop directory '+DATA_DM02/edwt/DATAFILE'
Thu Sep 20 17:59:07 2012
Errors in file /u01/app/grid/diag/asm/+asm/+ASM2/trace/+ASM2_ora_67709.trc  (incident=73026):
ORA-04030: out of process memory when trying to allocate 184 bytes (callheap,kffd)
Incident details in: /u01/app/grid/diag/asm/+asm/+ASM2/incident/incdir_73026/+ASM2_ora_67709_i73026.trc
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Thu Sep 20 17:59:40 2012
Errors in file /u01/app/grid/diag/asm/+asm/+ASM2/trace/+ASM2_ora_67709.trc  (incident=73027):
ORA-04030: out of process memory when trying to allocate 48 bytes (kfui heap,kfuilst)
ORA-04030: out of process memory when trying to allocate 184 bytes (callheap,kffd)
Incident details in: /u01/app/grid/diag/asm/+asm/+ASM2/incident/incdir_73027/+ASM2_ora_67709_i73027.trc
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.   

Solution:

receate database using DBCA and put datafiles in these directories and then using dbca to drop the database you created.

ASMCMD> ls -l
Type Redund Striped Time Sys Name
Y YHDLOG/
已经被删除掉了.