Sunday, 12 June 2016

Manually Adding Space to ASM Disk

Pre-requisites:

Ensure you set ASM instance environment.
Ensure you connect ASM instance as sysasm user, not sys/sysdba.
Ensure you entered the right disk group name in add disk group syntax.

Implementation Steps:

Step 1: Before adding disk group verify the disk group status using below query. 

select a.name DiskGroup, b.disk_number Disk#, b.name DiskName, b.total_mb, b.free_mb, b.path, b.header_status
from v$asm_disk b, v$asm_diskgroup a
where a.group_number (+) =b.group_number
and a.name='DATA'
order by b.group_number, b.disk_number, b.name;

Step  2: Identify the Disk Group for space addition E.g. DATA or FLASH or GRID1 or GRID2 etc...

SQL> SELECT GROUP_NUMBER, NAME, SECTOR_SIZE, BLOCK_SIZE,ALLOCATION_UNIT_SIZE,STATE,TYPE TOTAL_MB,FREE_MB FROM V$ASM_DISKGROUP;

Step  3: Check either for CANDIDATE or PROVISIONED disk using below query.

set lines 150
column path format a40
column name format a20

select name, path, mount_status, header_status, mode_status ,state, free_mb from v$asm_disk where header_status='CANDIDATE' order by 2;

Step  4: Once you identify the available disks in Step 3, Choose those disks for space addition

sqlplus / as sysasm
SQL> ALTER DISKGROUP DATA ADD DISK 'ORCL:DISKHP003' NAME DISKHP03 REBALANCE POWER 11;

Step  5: When you add the disks to Disk Group, rebalancing will happen automatically.  Check the status of rebalancing using the below query. Rebalancing will take a while to complete and it depends on the number of disks and space you are adding.

SQL> select * from v$asm_operation;

Step  6:  Either Query or login to asmcmd prompt to check if the space have been added.

>asmcmd lsdg

Step  7: Verify if the newly added disk HEADER_STATUS has changed to MEMBER.  

SQL> set lines 150
column path format a40
column name format a20
select name, path, mount_status, header_status, mode_status ,state, free_mb from v$asm_disk where header_status='MEMBER' order by 2;

Step  8: Check ASM Instance alert log for any issues.

0 comments:

Post a Comment