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
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)
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
No comments:
Post a Comment