ASM DISKGROUP RESIZE in 10g & 11g

ASM diskgroup is full and we want to add space to diskgroup. We have 2 options here

1. Add new disks depending on type of diskgroup / number of failgroups
2. Increase the size of the existing LUN / LV / Disk partition

First approach is pretty straight forward

For example, if we have a NORMAL redundancy ASM diskgroup DATADG with 2 failgroups then

SQL> alter diskgroup DATADG add 
FAILGROUP DATADG_FG1 disk '/dev/raw/raw3' 
FAILGROUP DATADG_FG2 disk '/dev/raw/raw4' ;

Based on the system load, we can decide when to rebalance the diskgroup.

This approach does not need any down time i.e. disks can be added when ASM & DB are running (Rebal operation will have some overhead, so we should be doing this when system is not heavily used).
Now second approach (whole purpose of writing this note)

First we need to extend LUN or LV or disk partition, so that OS can see the revised size.

But here is the twist

If we are using oracle 10g, we’ll have to bounce the ASM instance (and database), so that ASM can read the new disk size. This is due to Bug 4110313 : ASM DISK RESIZE FAILS FOR OS DEVICES GROWN AFTER ASM INSTANCE STARTUP

So if you try to increase the diskgroup size using following command, command will not have any effect (although OS can see revised disk size)

SQL> select name, total_mb, usable_file_mb from v$asm_diskgroup;
NAME TOTAL_MB USABLE_FILE_MB
------------------------------ ---------- --------------
DATADG 69688 3460

SQL> alter diskgroup DATADG resize all;
Diskgroup altered.

SQL> select name, total_mb, usable_file_mb from v$asm_diskgroup;
NAME TOTAL_MB USABLE_FILE_MB
------------------------------ ---------- --------------
DATADG 69688 3460

This problem is fixed in 11g and we don’t have to recycle ASM instance

SQL> select name, total_mb, usable_file_mb from v$asm_diskgroup;
NAME TOTAL_MB USABLE_FILE_MB
------------------------------ ---------- --------------
DATADG 69688 3460


SQL> alter diskgroup DATADG resize all;
Diskgroup altered.

SQL> select name, total_mb, usable_file_mb from v$asm_diskgroup;
NAME TOTAL_MB USABLE_FILE_MB
------------------------------ ---------- --------------
DATADG 139320 38276

 

 

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

3 Responses to ASM DISKGROUP RESIZE in 10g & 11g

  1. dkn says:

    Hi, I have a question about resizing LUN in ASM oracle 11g. Hope i may get the answer for that here….
    Right now ASM has 3 LUNs assigned, two for 10G and 1 for 11G. We found that we have more and more data in 11G so we would like to reallocate one LUN to the 11G storage.

    Please let me know if it possible..? If yes what is the process to be followed?

    • Are two ways to achieve that you are asking: (If I get this right).
      You have two diskgroups (10G and 11G) Example DATA and DATA2.
      Each diskgroup have disks ( 2 disks assigned to the 10G and 1 disk to the 11G database).
      The options are:
      1.- Grow the current LUN ( and re-size the partition ), next perform “alter diskgroup DATA resize ALL rebalance power 4;”
      NOTE: Change the name DATA for the right diskgroup.
      2.- Add Other LUN to the diskgroup (Example DATA).

      More details can be found here. http://docs.oracle.com/cd/B28359_01/server.111/b31107/asmdiskgrps.htm

      I hope this helps.

  2. As I understand you are using 11g ASM. 2 LUNS are added in 10g diskgroup and 1 LUN in 11g. You can use 10g LUN in 11g after removing it from 10g diskgroup. Once removed from 10g ASM, disk header should be FORMER. Use dd to cleanup the disk header. Now disk header will be clean and you should see header status as CANDIDATE. Add this disk in 11g using standard procedure.

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