ASM Adding and Removing disk in single operation

I wanted to add a new big disk in a ASM external disk group & remove few small disks. In both of these operation, disk rebalancing will come in picture. So the best option was to add/remove disks in one SQL command.

I’m adding a new disk of 100G & removing 18x5G disks.

NOTE: I’ve intentionally left about 20G as buffer space. As there is always a change of rebalancing failure ORA-15041 discussed in https://oraclehandson.wordpress.com/2010/01/25/asm-disk-rebalance-ora-15041/

SQL> ALTER DISKGROUP DATA ADD DISK ‘/dev/rdsk/c2t20120002AC000212d4s6’
DROP DISK DATA_0054
DROP DISK DATA_0053
DROP DISK DATA_0052
DROP DISK DATA_0051
DROP DISK DATA_0050
DROP DISK DATA_0049
DROP DISK DATA_0048
DROP DISK DATA_0047
DROP DISK DATA_0046
DROP DISK DATA_0045
DROP DISK DATA_0044
DROP DISK DATA_0043
DROP DISK DATA_0042
DROP DISK DATA_0041
DROP DISK DATA_0040
DROP DISK DATA_0033
DROP DISK DATA_0032
DROP DISK DATA_0031
/

To speed up this operation, I’ve changed the ASM REBALANCE POWER parameter for the diskgroup to 10

SQL> ALTER DISKGROUP DATA REBALANCE POWER 10
/

We can verify that by querying V$ASM_OPERATION view

SQL> SELECT * FROM V$ASM_OPERATION
/

GROUP_NUMBER OPERA STAT POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES
———— —– —- ———- ———- ———- ———- ———- ———–
1 REBAL RUN 10 10 26460 150836 1703 73

NOTE: This is just an initial calculation. It took much more time to rebalance.

Now it started the disk drop operation (STATE:DROPPING) & rebalance, which we can verify by querying V$ASM_DISK

SQL> SELECT PATH, NAME, HEADER_STATUS, STATE, TOTAL_MB, FREE_MB FROM V$ASM_DISK
/
After some time, the FREE_MB value for the newly added disk will start reducing & at the same time FREE_MB value for dropping disk will start increasing. i.e. it is removing the data from DROPPING disks and rebalancing it on the newly added disk.

PATH NAME HEADER_STATU STATE TOTAL_MB FREE_MB
—————————————- ———— ———— ——– ———- ———-
/dev/rdsk/c2t20120002AC000212d4s6 DATA_0055 MEMBER NORMAL 102343 99233
/dev/rdsk/c2t20120002AC000212d72s6 DATA_0054 MEMBER DROPPING 5106 302
/dev/rdsk/c2t20120002AC000212d71s6 DATA_0053 MEMBER DROPPING 5106 304
/dev/rdsk/c2t20120002AC000212d70s6 DATA_0052 MEMBER DROPPING 5106 302
/dev/rdsk/c2t20120002AC000212d69s6 DATA_0051 MEMBER DROPPING 5106 303
/dev/rdsk/c2t20120002AC000212d68s6 DATA_0050 MEMBER DROPPING 5106 302
/dev/rdsk/c2t20120002AC000212d67s6 DATA_0049 MEMBER DROPPING 5106 304
/dev/rdsk/c2t20120002AC000212d66s6 DATA_0048 MEMBER DROPPING 5106 302
/dev/rdsk/c2t20120002AC000212d65s6 DATA_0047 MEMBER DROPPING 5106 303
/dev/rdsk/c2t20120002AC000212d64s6 DATA_0046 MEMBER DROPPING 5106 303
/dev/rdsk/c2t20120002AC000212d63s6 DATA_0045 MEMBER DROPPING 5106 303
/dev/rdsk/c2t20120002AC000212d62s6 DATA_0044 MEMBER DROPPING 5106 301
/dev/rdsk/c2t20120002AC000212d61s6 DATA_0043 MEMBER DROPPING 5106 303
/dev/rdsk/c2t20120002AC000212d60s6 DATA_0042 MEMBER DROPPING 5106 303
/dev/rdsk/c2t20120002AC000212d59s6 DATA_0041 MEMBER DROPPING 5106 302
/dev/rdsk/c2t20120002AC000212d58s6 DATA_0040 MEMBER DROPPING 5106 303
/dev/rdsk/c2t20120002AC000212d57s6 DATA_0033 MEMBER DROPPING 5106 302
/dev/rdsk/c2t20120002AC000212d56s6 DATA_0032 MEMBER DROPPING 5106 302
/dev/rdsk/c2t20120002AC000212d55s6 DATA_0031 MEMBER DROPPING 5106 302

SQL> SELECT PATH, NAME, HEADER_STATUS, STATE, TOTAL_MB, FREE_MB FROM V$ASM_DISK
/
We can again track the rebalance operation status from V$ASM_OPERATION

PATH NAME HEADER_STATU STATE TOTAL_MB FREE_MB
—————————————- ———— ———— ——– ———- ———-
/dev/rdsk/c2t20120002AC000212d4s6 DATA_0055 MEMBER NORMAL 102343 94290
/dev/rdsk/c2t20120002AC000212d72s6 DATA_0054 MEMBER DROPPING 5106 556
/dev/rdsk/c2t20120002AC000212d71s6 DATA_0053 MEMBER DROPPING 5106 557
/dev/rdsk/c2t20120002AC000212d70s6 DATA_0052 MEMBER DROPPING 5106 556
/dev/rdsk/c2t20120002AC000212d69s6 DATA_0051 MEMBER DROPPING 5106 556
/dev/rdsk/c2t20120002AC000212d68s6 DATA_0050 MEMBER DROPPING 5106 556
/dev/rdsk/c2t20120002AC000212d67s6 DATA_0049 MEMBER DROPPING 5106 558
/dev/rdsk/c2t20120002AC000212d66s6 DATA_0048 MEMBER DROPPING 5106 555
/dev/rdsk/c2t20120002AC000212d65s6 DATA_0047 MEMBER DROPPING 5106 557
/dev/rdsk/c2t20120002AC000212d64s6 DATA_0046 MEMBER DROPPING 5106 557
/dev/rdsk/c2t20120002AC000212d63s6 DATA_0045 MEMBER DROPPING 5106 556
/dev/rdsk/c2t20120002AC000212d62s6 DATA_0044 MEMBER DROPPING 5106 555
/dev/rdsk/c2t20120002AC000212d61s6 DATA_0043 MEMBER DROPPING 5106 556
/dev/rdsk/c2t20120002AC000212d60s6 DATA_0042 MEMBER DROPPING 5106 557
/dev/rdsk/c2t20120002AC000212d59s6 DATA_0041 MEMBER DROPPING 5106 556
/dev/rdsk/c2t20120002AC000212d58s6 DATA_0040 MEMBER DROPPING 5106 556
/dev/rdsk/c2t20120002AC000212d57s6 DATA_0033 MEMBER DROPPING 5106 556
/dev/rdsk/c2t20120002AC000212d56s6 DATA_0032 MEMBER DROPPING 5106 555
/dev/rdsk/c2t20120002AC000212d55s6 DATA_0031 MEMBER DROPPING 5106 556

SQL> SELECT * FROM V$ASM_OPERATION
/

GROUP_NUMBER OPERA STAT POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES
———— —– —- ———- ———- ———- ———- ———- ———–
1 REBAL RUN 10 10 36343 171459 1645 82

Advertisements
This entry was posted in Oracle Automatic Storage Management and tagged . Bookmark the permalink.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s