Information about How to Remove ASM Diskgroups and ASM Instance
This document will describe how to remove an ASM instance from a RAC node. It will also describe the entire process for removing ASM, removing ASM Diskgroups, and reinstalling ASM Instance.
This process is used to clean up a failed ASM install and wipe all ASM Instance/Diskgroups to prepare systems for a new ASM installation.
Document Creator Todd Walters
How to Remove ASM Instance and DiskGroups
- Check ASM status on RAC Nodes
- Login via oracle and run showcrs to view status.
Stop ASM instance on each node:
- srvctl stop asm -n node (where node is node name, ie srv0dbxd11)
Login to node 2 and 3 and run . oraenv and source +ASMx where X=instance number, ie. +ASM2 for node2.
Go to sqlplus with sqlplus sys as sysdba and do the following on node 2 & 3 first:
- SQL> Alter diskgroup all dismount;
Back on Node1, run sqlplus again and list all ASM Diskgroups with this command:
- SQL> select name,total_mb from v$asm_diskgroup;
- NAME TOTAL_MB
To remove these ASM Diskgroups, complete the following command (Make sure you want to remove these)
- SQL> drop diskgroup dwak_data_01 including contents;
- Should see: Dropped dwakdb_data_01 successfully
- Run drop command again for any other ASM diskgroups to remove.
Next while logged in as Oracle on Node 1, remove all ASM instances
- srvctl remove asm -n nodeX (where nodeX=srv0dbxd13 for example)
- run for each node in RAC cluster.
Next edit the /etc/oratab file on all nodes in RAC Cluster and remove the following line:
- +ASM1:/u00/app/oracle/product/10.2.0/ASM:N (remove this on all nodes)
As root, verify all Oracle ASM disks are listed properly and run scandisks
- [root@srv0dbxd11 init.d]# ./oracleasm listdisks
- [root@srv0dbxd11 init.d]# ./oracleasm scandisks
Scanning system for ASM disks: [ OK ]
- then run ./oracleasm restart to restart ASM
Once everything is okay, you can reinstall ASM Instance.
- Login to node 1 with VNC.
- Run xhost +
- su - oracle
- . oraenv
- +ASM1 and enter /u00/app/oracle/product/10.2.0/ASM for ORACLE_HOME
- cd $ORACLE_HOME/bin and run ./dbca
- choose Install ASM
- Follow How to Install Oracle 10gR4 ASM Instance guide.