Tuesday, September 23, 2008

ASM - Adding a new diskgroup

ASM new disk groups can be created easily and the steps below can be followed to achieve the same:

1.Check the available disks for adding to the diskgroup with header status candidate
Log on to the ASM instance and check the header status of the disks to see which are the disks available for ASM.The Candidate disks can be used to create a new diskgroup or for adding it to a existing diskgroup.

Query: select HEADER_STATUS,MODE_STATUS,NAME,PATH,TOTAL_MB,FREE_MB from v$asm_disk;

Sample Output:
MOUNT_S HEADER_STATU MODE_ST NAME PATH TOTAL_MB FREE_MB------- ------------ ------- ------------------ ------------------------- ---------- ----------CLOSED CANDIDATE ONLINE /dev/raw/raw35 548437 0CLOSED CANDIDATE ONLINE /dev/raw/raw36 548437 0CLOSED CANDIDATE ONLINE /dev/raw/raw37 548437 0CLOSED CANDIDATE ONLINE /dev/raw/raw38 548437 0CLOSED CANDIDATE ONLINE /dev/raw/raw39 548437 0CLOSED CANDIDATE ONLINE /dev/raw/raw40 548437

2. Find the current diskgroup names

Query:select name,total_mb from v$asm_dikgroup;

3. Create a new diskgroup with the new name- (There will be no rebalancing here)
Creating a new diskgroup will not have rebalancing operation.There is an option for redundancy at the ASM level, in the example I have redundancy at the hardware level hence the diskgroup has a clause for external redundancy.

Query: CREATE DISKGROUP DG9 EXTERNAL REDUNDANCY disk '/dev/raw/raw35','/dev/raw/raw36','/dev/raw/raw37','/dev/raw/raw38','/dev/raw/raw39','/dev/raw/raw40';

4. Other instances will not mount the new diskgroup hence add an entry in the spfile , so they will be monted from the next startup and manually mount them for this first time.

Query : ALTER DISKGROUP DG9 MOUNT;