Allocating more space to external ASM diskgroup

How to allocate more space to a full ASM diskgroup that is externally defined.
en español

I have this database that uses ASM (Automated Storage Management) and its diskgroups are externally defined (the storage system takes care of it, not ASM.)

Whenever the diskgroups get full, I have to ask the storage admin to give me more space. After he allocates the space, I have to resize the diskgroups in ASM.

First, check how full the diskgroups are. Run this query:


SELECT name, state, type, total_mb allocated, (total_mb – free_mb) used, ROUND((1- (free_mb / total_mb))*100, 2)  pct_full
FROM v$asm_diskgroup
ORDER BY pct_full desc;
Name
State
Type
Alloc
Used
Pct_Full
DATA1 CONNECTED EXTERN 256060 243257 95
DATA2 CONNECTED EXTERN 204800 130554 64
REDO_A CONNECTED EXTERN 40964 2525 6
REDO_B CONNECTED EXTERN 40964 2525 6
FRA CONNECTED EXTERN 204800 4503 2
ADMIN CONNECTED EXTERN 20480 396 2

 


The DATA1 diskgroup is 95% full. Since the disks are external, I had to ask the storage admin to allocate more space. I wanted the disk to be at 85% full, so I asked for an extra 30,125 MB.

After the storage person allocated the space, I resized the disks in the diskgroup.  I ran the query below to generate the resize statements:
select ‘ALTER DISKGROUP ‘ || dg.name || ‘ RESIZE DISK ‘ || d.name || ‘;’
from V$ASM_DISK d, V$ASM_DISKGROUP dg
where d.group_number = dg.group_number
and dg.name = ‘DATA1’;


I logged into the server as the grid user (the owner of the ASM instance);
Log in as the grid user.
ORACLE_SID=+ASM
sqlplus / as sysasm


–statements generated from the query above.
ALTER DISKGROUP DATA_MDMPROD RESIZE DISK DATA1_0000;
ALTER DISKGROUP DATA_MDMPROD RESIZE DISK DATA1_0004;
ALTER DISKGROUP DATA_MDMPROD RESIZE DISK DATA1_0001;
ALTER DISKGROUP DATA_MDMPROD RESIZE DISK DATA1_0002;


I manually rebalanced the diskgroup for good measure:
ALTER DISKGROUP DATA1 REBALANCE POWER 5 WAIT;

 

 

I reran the initial query to check how full the diskgroups were after; the diskgroup should have a much lower pct_used.
SELECT name, state, type, total_mb allocated, (total_mb – free_mb) used, ROUND((1- (free_mb / total_mb))*100, 2)  pct_full
FROM v$asm_diskgroup
ORDER BY pct_full desc;

 

Name
State
Type
Alloc
Used
Pct_Full
DATA1
CONNECTED
EXTERN
286185
243257
85
DATA2
CONNECTED
EXTERN
204800
130554
64
REDO_A
CONNECTED
EXTERN
40964
2525
6
REDO_B
CONNECTED
EXTERN
40964
2525
6
FRA
CONNECTED
EXTERN
204800
4503
2
ADMIN
CONNECTED
EXTERN
20480
396
2

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 )

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s