Oracle ASM makes life easy!

I just wanted to share an experience that I had with Oracle ASM that made my life a breeze. ASM gives the DBA more control and flexibility in dealing with storage. It even has some excellent performance benefits.

Well, I would also like to add to the list that it also proactively cures headaches and stress! This is why. We have an IBM Shark that is going off of lease. We needed to move the database to Hitachi storage. The problem was we needed to do it fast and we couldn’t get the application owners to give us a change window in the alloted time frame. The most they would give us was 2 hours and this was a multi-terabyte database. It wasn’t happening!

So how did Oracle ASM save me? Simple! I just added the new disks to my existing diskgroup and let ASM automatically rebalance the disks. I let this job run overnight with virtually no impact to application performance. I could have done it with a higher rebalancing factor but that had a greater chance to impact the application. Instead, I just did it with a power of 1 which was the default.

Once the job finished rebalancing, I then moved to drop the old disks. Please make sure you add more than enough space in new disks to allow you to remove the old ones. With the disks being dropped, Oracle moved all extents off those disks and neatly rebalanced it on the ones that were left. The job took a day to complete and after ASM was done with them, the Unix SA and SAN admin went ahead and removed them, all the while the application maintained 100% uptime and solid performance.

ASM has it’s limitations such as having to use RMAN to do backups and many of your shell scripts won’t work against it without being rewritten to use sqlplus instead or RMAN, but even RMAN is an improvement over traditional backups. I wouldn’t even call this a limitation but a strength. Oh well, I’ll just stick with ASM on this one. Definitely take the time to get up to speed on ASM! It’s a lifesaver.
 

11 Comments »

  1. Yas said,

    April 15, 2008 @ 12:26 am

    Thomas, you can even do the drop-add at the same time with a single command, it is great.

  2. Thomas Roach said,

    April 15, 2008 @ 4:07 am

    Is it as simple as doing:

    alter diskgroup add etc….. drop etc…..? I’ll have to experiment! : )

  3. Yas said,

    April 15, 2008 @ 4:32 am

    Yes, that easy. You can do the same job with a single rebalance operation.

  4. Steeve Bisson said,

    April 22, 2008 @ 12:51 pm

    Can you do this with external redundancy? Or you absolutely need asm to mirror data?

  5. Thomas Roach said,

    April 22, 2008 @ 2:14 pm

    I did it with external redundancy.

  6. adrian said,

    December 2, 2008 @ 1:17 am

    Hi Thomas,

    I’m actually now in a similar situation with you where i’m the application owner and there is an effort to move storage from EMC DMX2 to DMX4. The approach that has been laid out is similar to yours by which new diskgroup is presented and by dropping the old diskgroup, asm copies to the new one- hence, online and does not impact business activities.

    Few questions I have though (i come from a non-oracle background, and little knowledge of hardware):

    1. what happens if the activity fails midway? how would the data be recovered since it’s in limbo?
    2. also, do you have any resource in which will allow me to learn how to perform this activity?
    3. also, what was your transfer rate? how many hrs for x tb?

    really appreciate if you could reply to this.

    thank you

  7. Thomas Roach said,

    December 2, 2008 @ 4:09 am

    Adrian,

    You can add and drop disks at the same time. Make sure you are doing this (new disks >= dropped disks) when you add the new disks. You can issue the operation inside of sqlplus and add the keyword wait at the end. When it is finished it will return the prompt back to you. You can also monitor the operation by issuing “select * from v$asm_operation”.It will list your rebalance jobs if they are currently running. This job will stay there until the job is finished. As it is moving or rebalancing the data, the ASM and RDBMS instances engage in synchronization of extents, so in essence the extent maps are being updated in real time. The rebalance power can be anywhere from 0 to 11. If 0, it won’t rebalance. I did it with 1 and I did a 1.2 TB DB in about 10 hours but that was also with a pretty full DB load. What you could do is add a couple of disks and test your transfer rate. Add 2 disks but don’t drop any. What is the performance like? That should give you some idea. I believe if the job fails, you can restart it by issuing, “alter diskgroup diskgroup_name rebalance [power 1-11]“. You can change the power on the fly for a current operation. Meaning, you can try a rebalance of 5, and if it is too much, you can alter it and it will restart the rebalance with the new power.

    As to information, I think you can refer to the docs.

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/storeman.htm

    As to the transfer rate, I don’t even recall. I know I started it around midnight and it finished the next day around 10am.

    Good Luck!

  8. Saranya said,

    February 5, 2009 @ 7:24 am

    Hi,

    On seeing your post, Using ASM for migrating to new set of storage disks seems like a great option.

    You said “new disks >= dropped disks”, did you mean the number of disks or the storage space in the disks?
    Which version of Oracle ASM/Database did you use?

    We are planning to do this on a physical standby with a power of 11 as we can afford to have the downtime.
    Thanks,
    Saranya

  9. Thomas Roach said,

    February 5, 2009 @ 7:30 am

    I meant the storage space of the disks. You can also do this on the Physical Standby why it is up, the apply process might appear very slow or even hung, but when it is done, you should be ok. Watch your I/O performance along with CPU to see what happens.

    If you are pegged, you can issue “alter diskgroup diskgroup_name rebalance 5″ or some other power and it will stop the current rebalance operation and start a new one with less utilization.

  10. Saranya said,

    February 5, 2009 @ 12:48 pm

    Ok, thanks! Did you use 10.2.0.2?

  11. Thomas Roach said,

    February 5, 2009 @ 12:56 pm

    I believe it was 10.2.0.3 but it will work with 10.2.0.2.

RSS feed for comments on this post · TrackBack URI

Leave a Comment