Tuesday, June 14, 2011

Using ASM makes expanding a database instance pretty painless

While ASM is often thought of as being deployed principally in RAC based configurations it can be a very useful component to help manage and/or migrate storage in a single instance ( non clustered ) setup also. Logically the steps involved to add some additional LUNs and then expand ( one or more ) tablespaces would look like this:

1) Get the LUNs established in your storage environment and then make them available to the server.

*** In a linux/emc environment this might involve steps to scan the storage environment from linux ( several techniques available such as /usr/sbin/lpfc/lun_scan all if you have Emulex HBA's ). Then something like "powermt config" and/or "powermt display dev=all" to verify that newly allocated LUNs are available.

You will also have to change the ownership of the LUNs so that oracle can use them.

2) Add the LUNs to the ASM storage group that is relevant.

I like to use symbolic links to the linux /dev/emcpower* device paths to make it easier to see what LUN belongs to what storage group.

One path here is to use sqlplus and login to the +ASM instance and do a command like this "alter diskgroup some_name add disk '/my_symbolic_base_dir/some_name/disk5' REBALANCE POWER 5;".

This can be done on a live system but I would recommend that careful testing and some consideration of when these changes are implemented ( along with considering what setting to use for POWER value ) be done on a test system first.

After starting a rebalance one would want to check how long it is running and not really do anything else probably until the rebalance has completed. A query like this "select group_number, operation, state, power, est_minutes from v$asm_operation;" can be used to monitor ... when no rows are returned the rebalance has finished.

3) Modify the storage of the tablespace(s) that are using the (newly expanded) storage group.

Instead of connecting to the +ASM instance this time the modifications would be done via a connection to the Oracle database instance. Something like this "ALTER DATABASE DATAFILE '+SOME_NAME/instance_name/datafile/tablespace_name.XYZ.QRSTNEWRV' RESIZE 102400M;" would make it expand to 100 gig ( the funky string of characters would all be numbers ).

Plus what else would we immediately follow up our changes with?

4) Take a new rman backup please!

No comments:

Post a Comment