Home > tips > Add and drop disks concurrently to a diskgroup in Oracle ASM, as to gain hours by one time rebalance

Add and drop disks concurrently to a diskgroup in Oracle ASM, as to gain hours by one time rebalance


Adding a disk to a disk group needs rebalancing the data across newly formed diskgroup consisting newer disks. Dropping also needs similar rebalancing across diskgroup as you guess.

If you need to add and drop disks at the same time, then this trick is what you are looking for or bumped into.

As you could understood from below real world example SQL, the dgdata diskgroup is changed by adding 13 disks from new cabinet, and dropping 13 disks from old cabinet. And it worked smothly, thus we gained at least 15 hours from one time rebalancing instead of two times rebalancing. Also it worths noting that no intervention is needed, because you need to execute one SQL instead of 2.

-- Concurrently execute add/drop disk in order gain from rebalance time.

ALTER DISKGROUP DATADG
ADD DISK
    '/dev/ORACLE/ASMDISK/DATA7' NAME DATA_0007,
    '/dev/ORACLE/ASMDISK/DATA8' NAME DATA_0008,
    '/dev/ORACLE/ASMDISK/DATA9' NAME DATA_0009,
    '/dev/ORACLE/ASMDISK/DATA10' NAME DATA_0010,
    '/dev/ORACLE/ASMDISK/DATA11' NAME DATA_0011,
    '/dev/ORACLE/ASMDISK/DATA12' NAME DATA_0012,
    '/dev/ORACLE/ASMDISK/DATA13' NAME DATA_0013,
    '/dev/ORACLE/ASMDISK/DATA14' NAME DATA_0014,
    '/dev/ORACLE/ASMDISK/DATA15' NAME DATA_0015,
    '/dev/ORACLE/ASMDISK/DATA16' NAME DATA_0016,
    '/dev/ORACLE/ASMDISK/DATA17' NAME DATA_0017,
    '/dev/ORACLE/ASMDISK/DATA18' NAME DATA_0018,
    '/dev/ORACLE/ASMDISK/DATA19' NAME DATA_0019
DROP DISK
    DATADG_0000,
    DATADG_0001,
    DATADG_0002,
    DATADG_0003,
    DATADG_0004,
    DATADG_0005,
    DATADG_0006,
    DATADG_0007,
    DATADG_0008,
    DATADG_0010,
    DATADG_0011,
    DATADG_0012
REBALANCE POWER 5;
Advertisements
  1. No comments yet.
  1. No trackbacks yet.

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

Don Charisma

because anything is possible with Charisma

Carol no Mundo!

Aventuras de uma intercambista a trabalho pelo mundo!

Blog do PHP

Oracle DBA for rookies!

nimaidba

Welcome to the world of Oracle with me....

Tech

News and reviews from the world of gadgets, gear, apps and the web

WordPress.com

WordPress.com is the best place for your personal blog or business site.

Gurcan Orhan's ODI and DWH Blog

Some words about Oracle Data Integrator and Data Warehousing.

%d bloggers like this: