Friday, June 26, 2015

How to add multiple ASM Disks to a Diskgroup

$ export ORACLE_SID=+ASM
$ . oraenv
$ sqlplus '/as sysasm'


SQL>

1. Verifiy newly added disks (should show as candidates).

set linesize 120
column path format a20
SELECT name,path,header_status,total_mb FROM v$asm_disk;


NAME                           PATH                 HEADER_STATU   TOTAL_MB
------------------------------ -------------------- ------------ ----------
                               /dev/asm_128G_P11_1  CANDIDATE             0
                               /dev/asm_128G_P12_1  CANDIDATE             0
                               /dev/asm_128G_P8_2   CANDIDATE             0
                               /dev/asm_128G_P9_1   CANDIDATE             0
DATA_0000                      /dev/asm_128G_P0_1   MEMBER           131072
DATA_0001                      /dev/asm_128G_P1_1   MEMBER           131072
DATA_0002                      /dev/asm_128G_P2_1   MEMBER           131072
DATA_0003                      /dev/asm_128G_P3_1   MEMBER           131072
DATA_0004                      /dev/asm_128G_P4_1   MEMBER           131072
DATA_0006                      /dev/asm_128G_P5_1   MEMBER           131072
DATA_0005                      /dev/asm_128G_P6_1   MEMBER           131072

NAME                           PATH                 HEADER_STATU   TOTAL_MB
------------------------------ -------------------- ------------ ----------
FLASHBACK_0000                 /dev/asm_128G_P7_1   MEMBER           131072
FLASHBACK_0001                 /dev/asm_128G_P8_1   MEMBER           131072


2. Add CANDIDATE disks to DATA disksgroup with rebalance power 1. The message 'Diskgroup altered.' will appear on the original window when the command is accepted.  When no rows are returned from the query in step 3 the work is completed.

SQL> ALTER DISKGROUP DATA ADD DISK
'/dev/asm_128G_P9_1' name DATA_0007 size 131072M,
'/dev/asm_128G_P8_2' name DATA_0008 size 131072M,
'/dev/asm_128G_P12_1' name DATA_0009 size 131072M 
REBALANCE POWER 1
SQL> / 


3. Monitor the status of the operation use the following query.  This should be done until no line is returned. 

set linesize 120
select * from v$asm_operation
/


4. Add CANDIDATE disk to FLASHBACK disksgroup with rebalance power 1.  The message 'Diskgroup altered.' will appear on the original window when the command is accepted.  When no rows are returned from the query in step 5 the work is completed.

ALTER DISKGROUP FLASHBACK ADD DISK '/dev/asm_128G_P11_1' name FLASHBACK_0002 size 131072M  REBALANCE POWER 1
/

5. Monitor the status of the operation use the following query.  This should be done until no line is returned.

set linesize 120
select * from v$asm_operation
/


6. Verify that all work is completed.  Header status should reflect member for all disks.
SELECT name, path, header_status, total_mb FROM v$asm_disk order by name, path, header_status
/


No comments:

Post a Comment