facebook twitter youtube facebook facebook facebook

E-Mail : info@askmlabs.com

Phone : +1.215.353.8306

Home » » Drop a disk in an ASM Disk Group

Drop a disk in an ASM Disk Group

Written By askMLabs on Saturday, January 8, 2011 | 2:45 PM

The big challenge in ASM is to reconfigure the storage online. This is due to the feature that ASM distributes data across all disks in a disk group evenly.
So when you are planning to drop any disk from the diskgroup, we need to see if the data in the disk we are removing can be readjusted in the other available disks in the same diskgroup.
When you drop a disk from diskgroup ASM will seamlessly migrate the data to the existing disks in the disk group.
SQL> select group_number, name, TOTAL_MB, FREE_MB from V$asm_disk_stat;

GROUP_NUMBER NAME              TOTAL_MB    FREE_MB
------------ --------------- ---------- ----------
1 ASM_DISK1             3067       3008
2 ASM_DISK2             3067       1248
3 ASM_DISK3             5114       5062
4 DISK_E                1019        898
4 DISK_F                1019        901
4 DISK_G                1019        901

6 rows selected.


From the above output, diskgroup 4 has three disks each with the same size. If you see the FREE_MB, it is almost same in all the 3 disks.
Now we will drop DISK_F and DISK_G from diskgroup 4 and will see how the data is rebalanced in the last remaining disk DISK_E.
SQL> alter diskgroup DG1 drop disk DISK_G;

Diskgroup altered.

SQL> alter diskgroup DG1 drop disk DISK_F;

Diskgroup altered.

SQL> select * from v$asm_operation;

GROUP_NUMBER OPERA STATE           POWER     ACTUAL      SOFAR   EST_WORK   EST_RATE EST_MINUTES ERROR_CODE
------------ ----- ---------- ---------- ---------- ---------- ---------- ---------- ----------- --------------------------------------------
4 REBAL RUN                 1          1        145        231        660           0

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

GROUP_NUMBER NAME              TOTAL_MB    FREE_MB
------------ --------------- ---------- ----------
1 ASM_DISK1             3067       3008
2 ASM_DISK2             3067       1248
3 ASM_DISK3             5114       5062
4 DISK_E                1019        746
4 DISK_F                1019        977
4 DISK_G                1019        977

6 rows selected.


Now we can see from the above result that the FREE_MB for disks DISK_F and DISK_G is increasing as data is moving to DISK_E and FREE_MB is decreasing in DISK_E as data is coming from other two disks to this disk.

When the total rebalncing is completed,the disks will be removed from the diskgroup 4.
SQL> select * from v$asm_operation;

no rows selected

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

GROUP_NUMBER NAME              TOTAL_MB    FREE_MB
------------ --------------- ---------- ----------
1 ASM_DISK1             3067       3008
2 ASM_DISK2             3067       1248
3 ASM_DISK3             5114       5062
4 DISK_E                1019        666


Hope it helps

SRI
Share this article :

Related Articles By Category



Post a Comment

Thank you for visiting our site and leaving your valuable comment.

 
Support :
Copyright © 2013. askMLabs - All Rights Reserved
Proudly powered by Blogger