I must thank my fellow DBA Franky Weber Faust for his publication in his blog.

The goal here is to show that via asmcmd it is also possible to remove a disk group. Let’s briefly see how to do this.

We list the disk groups:

[oracle@london1 ~]$ asmcmd
ASMCMD> lsdg
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 512 4096 4194304 40960 6900 0 6900 0 Y CONFIG/
MOUNTED EXTERN N 512 512 4096 4194304 12288 12156 0 12156 0 N DATA/

So we tried to delete the diskgroup:

ASMCMD> dropdg DATA
ORA-15039: diskgroup not dropped
ORA-15073: diskgroup DATA is mounted by another ASM instance (DBD ERROR: OCIStmtExecute)

Note that the message refers to the diskgroup being mounted on another instance.

Let’s then remotely dismount the diskgroup DATA that is also mounted on node 2 of the cluster:

[oracle@london1 ~]$ srvctl stop diskgroup -diskgroup DATA -n london2

Now it is mounted only on node 1:

[oracle@london1 ~]$ srvctl status diskgroup -diskgroup DATA
Disk Group DATA is running on london1

We finally managed to remove it:

ASMCMD> dropdg DATA

When listing the diskgroups the DATA is no longer present:

 ASMCMD> lsdg
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 512 4096 4194304 40960 6900 0 6900 0 Y CONFIG/

OK, but it would appear the same if we had just unmounted the diskgroup.

So let’s see if there is still a resource for the DATA diskgroup in the cluster:

[oracle@london1 ~]$ srvctl status diskgroup -diskgroup DATA
PRCA-1000 : ASM Disk Group DATA does not exist
PRCR-1001 : Resource ora.DATA.dg does not exist
[oracle@london1 ~]$ crsctl status resource ora.DATA.dg -t
CRS-2613: Could not find resource 'ora.DATA.dg'.

Note that for the diskgroup CONFIG there is a resource:

[oracle@london1 ~]$ srvctl status diskgroup -diskgroup CONFIG
Disk Group CONFIG is running on london1,london2

[oracle@london1 ~]$ crsctl status resource ora.CONFIG.dg -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.CONFIG.dg
ONLINE ONLINE london1 STABLE
ONLINE ONLINE london2 STABLE
--------------------------------------------------------------------------------