
If one disk group space is very low, then we need to move ASM disk from one disk group to another. Today we will learn how to do this. Let’s go through the steps :
Steps to move ASM Disk from one disk group to another :
Table of Contents
Here, we want to move the disk RECO_0005 from RECO to DATA disk group.
Step 1: Check the Disk Group Details with the below Query :
set lines 400
col NAME for a15
col FAILGROUP for a20
col path for a50
select GROUP_NUMBER,DISK_NUMBER,HEADER_STATUS,MOUNT_STATUS,SECTOR_SIZE,TOTAL_MB,FREE_MB/1024,FAILGROUP,STATE,NAME,MODE_STATUS,PATH from v$ASM_DISK order by 1,2,8;
Step 2: Issue the below command to drop Disk
Replace the disk name in place of RECO_0005. Also, you can change the rebalancing power accordingly/
ALTER DISKGROUP RECO DROP DISK RECO_0005;
ALTER DISKGROUP RECO REBALANCE POWER 32 NOWAIT;
Note :
- ASM rebalances a disk group automatically, whenever we add or remove disks from the disk group.
- Disk groups can be rebalanced manually using the REBALANCE clause of the ALTER DISKGROUP statement.
Step 3: Issue the below command to check if rebalancing is completed or not.
Check regularly until the output comes as no rows selected :
SQL> select * from v$asm_operation;
GROUP_NUMBER OPERA PASS STAT POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES ERROR_CODE CON_ID
------------ ----- --------- ---- ---------- ---------- ---------- ---------- ---------- ----------- -------------------------------------------- ----------
4 REBAL COMPACT WAIT 32 32 0 0 0 0 0
4 REBAL REBALANCE RUN 32 32 77739 268325 44905 4 0
4 REBAL REBUILD DONE 32 32 0 0 0 0 0
After the above output comes as now rows selected, go to next step :
Step 4: Issue the below command to get the Disk name :
SQL>SELECT MOUNT_STATUS,HEADER_STATUS,MODE_STATUS,STATE,TOTAL_MB,FREE_MB,NAME,PATH,LABEL,os_mb FROM V$ASM_DISK where HEADER_STATUS='FORMER';
you will get the NAME from the output as below:
MOUNT_S|HEADER_STATU|MODE_ST|STATE | TOTAL_MB| FREE_MB|NAME
-------|------------|-------|--------|----------|----------|---------------
PATH |LABEL | OS_MB
--------------------------------------------------|-------------------------------|----------
CLOSED |FORMER |ONLINE |NORMAL | 0| 0|
/dev/p31ereseries01001_mpathzp2 | | 1984594
Step 5: Move the Disk to the new diskgroup DATA.
Move ASM Disk from one disk group to another (from RECO to DATA) :
Issue the below command :
ALTER DISKGROUP DATA ADD DISK '/dev/p31eseries01001_mpathzp2' name DATA_0027;
ALTER DISKGROUP DATA REBALANCE POWER 32 NOWAIT;
Step 6: Check if the rebalancing Operation has been completed
Check regularly until the output comes as no rows selected :
select * from v$asm_operation;
So, here are the steps that you can move ASM Disk from one disk group to another. Also, like Disks, you can move datafiles also. For this you can refer the Oracle Doc as well.
How to move ASM database files from one diskgroup to another ? (Doc ID 330103.1)
Related Oracle Articles :
- How to check Free space in ASM Disk Group:2 Easy Steps:
- Create ASM diskgroup on Linux: Easy Step-by-step guide