Site icon IT Tutorial

How to Add and drop Disks to ASM Disk Group in Oracle with Alter Diskgroup Add Disk Command

I will explain How to Add Disks to ASM Disk Group in Oracle with ALTER DISKGROUP DATA ADD DISK Command in this post. Let’s review the Add and drop Disks to ASM Disk Group in this post.

 

Add and Drop Disks From ASM Disk Group in Oracle

You can add disks to ASM Disk group as follows. In this Example my Disk group name DATA, you can change it according to your Database.

SQL> alter diskgroup DATA add disk '/dev/oracleasm/disks/ASMDATA08';

Diskgroup altered.

SQL> alter diskgroup DATA add disk '/dev/oracleasm/disks/ASMDATA09';

Diskgroup altered.

SQL>

 

 

 

Add Disks to ASM Disk Group

You can specify the logical disk name and add disk to ASM Disk group as follows.

ALTER DISKGROUP DATA ADD DISK '/dev/mapper/asmtsk1' NAME DATA_0002 SIZE 102399 M REBALANCE POWER 10;


You can list the All ASM Disks and their state using the v$asm_disk view as follows.

select DISK_NUMBER,name ,PATH, MOUNT_DATE from v$asm_disk;

 

You can list the All ASM Disks statistics using the v$asm_disk_stat view as follows.

select group_number, name, TOTAL_MB, FREE_MB from V$asm_disk_stat;

 

 

Drop Disks from ASM Disk Group

You can drop disks from Disk group as follows.

Firstly list the disks and their name.

select DISK_NUMBER,name ,PATH, MOUNT_DATE from v$asm_disk;

 

Then drop the related disk.

alter diskgroup DATA drop disk DATA_0032;

 

You can check the drop and add disk operation status using the v$asm_operation view as follows.

select * from v$asm_operation;

 

You can change Disk group Rebalance power as follows. Thus, You can speed up this task and Disk group will perform rebalance operation in parallel.

ALTER DISKGROUP DATA REBALANCE POWER 8 NOWAIT;

 

 

Do you want to learn more detail about Oracle ASM ? Read the following article.

Oracle Automatic Storage Management ( ASM ) -2 Add Disk and Drop Disk Operations in Oracle ASM

Exit mobile version