Drop ASM Diskgroup

Here is an example of how to drop an ASM disk group.

On racnode1:

SQL> connect / as sysasm
Connected.
SQL> drop diskgroup ocr;
drop diskgroup ocr
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15073: diskgroup OCR is mounted by another ASM instance

On racnode2 ASM instance.

SQL> alter diskgroup ocr dismount;

Diskgroup altered.

SQL>

Back to racnode1 ASM instance, and drop the diskgroup ocr, which is not longer used and required. There are options:

INCLUDING CONTENTS:You must specify this clause if the disk group contains any files.
EXCLUDING CONTENTS: To ensure that Oracle ASM drops the disk group only when the disk group is empty. This is the default. If the disk group is not empty, then an error will be returned.
FORCE: Clears the headers on the disk belonging to a disk group that cannot be mounted by the Oracle ASM instance. The disk group cannot be mounted by any instance of the database.

SQL> drop diskgroup ocr;

Diskgroup dropped.

SQL>

Find the ASM disk label:

[root@racnode2 ~]# /sbin/blkid
...
..
.
/dev/sdi1: LABEL="ASM_OCR_VOTE" TYPE="oracleasm"
...
..
.

Delete the asm disk “ASM_OCR_VOTE” on one node only:

[root@racnode1 ~]# oracleasm deletedisk ASM_OCR_VOTE
Clearing disk header: done
Dropping disk: done
[root@racnode1 ~]#

[root@racnode1 bin]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Cleaning disk "ASM_OCR_VOTE"
Scanning system for ASM disks...

Remove vdi file from VirtualBox.

  1. go to every VM –>settings –>storage, choose the right vdi file and removes seleted storage attachment.
  2. go to Virtual Media Manager –>hard disks Tab –> choose the right one, and  click ‘Remove’.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.