Monday, July 18, 2016

How to drop and recreate Oracle ASM Disk Groups in RAC

This post covers the simple commands on ow to drop and recreate Oracle ASM Disk Groups in RAC.
Warning: Running these commands shall result in Data Loss.
SQL> create pfile from spfile;
$ asmtool -delete \\.\ASMDISK01
$ asmtool -delete \\.\ASMDISK02
$ asmtool -delete \\.\ASMDISK03

$ asmcmd
ASMCMD> lsdg

$ srvctl status diskgroup -g DATA01
$ srvctl status diskgroup -g RECO01
$ srvctl stop diskgroup -g DATA01 -f
$ srvctl stop diskgroup -g RECO01 -f
SQL> drop diskgroup RECO01 force including contents;
Diskgroup dropped.
SQL> drop diskgroup DATA01 force including contents;
Diskgroup dropped.
Now that the ASM Disk Groups and constituent Disks have been dropped/erased, the new ASM Disk Groups can be recreated.
CREATE DISKGROUP DATA01 EXTERNAL REDUNDANCY
  DISK '/dev/asm/asmdisk*';

Resources:
How To Drop and Recreate ASM Diskgroup (Doc ID 563048.1)

No comments:

Post a Comment