Add ASM disks to exiting ASM disk group and monitoring Re balancing operation :-

Extending and Existing DISK GROUP :-


ASM automatically re balances the disk group when disk are added By default the Alter disk group statement returns immediately after the disk have been added while the re balance operation continues to run asynchronously.you can query the V$ASM_OPERATION view to monitor the status of the re balance operation 
 
You can optionally use the RE BALANCE clause to manually control the re balance process. In the POWER clause,you can specify a value from 0 to 11.A value of 0 disable re balancing for this statement.A value of 1 causes the re balance to take place with minimal resources allocated to it.whereas a value of 11 permits ASM to execute the re balance to the value of the ASM_POWER_LIMIT initialization parameter . 
 
Dropping Disks from an existing DISK group :

When a disk is dropped. The disk group is re balanced by moving all the file extents from the dropped disk to other disks in the disk group .A drop disk operation will fail if not enough space is available on the other disk.Data will not be lost by dropping a disk . By default the alter disk group …. Drop disk statement returns before the drop and re balances operations are complete.Do not reuse,remove or disconnect the dropped disk until the HEADER_STATUS column for this disk in the v$ASM_DISK view changes to FORMER.You can query the v$ASM_OPERATION view to determine the amount of the time remaining for the drop/rebalance operation to complete . 
 
DISK_GROUP_NAME      DISK_FILE_PATH            DISK_FILE_NAME                 DISK_FILE_FAIL_GROUP           HEADER_STATU
-------------------- ------------------------- ------------------------------ ------------------------------ ------------
DATA                                 ORCL:DATA1                        DATA1                                          DATA1                                               MEMBER
DATA                                 ORCL:DATA3                        DATA3                                          DATA3                                                 MEMBER
DATA                                 ORCL:DATA2                        DATA2                                          DATA2                                                  MEMBER
OCRVOTE                      ORCL:OCR_VOTE3            OCR_VOTE3                                    OCR_VOTE3                                      MEMBER
OCRVOTE                      ORCL:OCR_VOTE1            OCR_VOTE1                                    OCR_VOTE1                                      MEMBER
OCRVOTE                      ORCL:OCR_VOTE2            OCR_VOTE2                                     OCR_VOTE2                                     MEMBER
[CANDIDATE]              ORCL:OCR_VOTE4                                                                                                                                  PROVISIONED
[CANDIDATE]             ORCL:OCR_VOTE5                                                                                                                                  PROVISIONED
[CANDIDATE]              ORCL:FRA3                                                                                                                                               PROVISIONED
[CANDIDATE]              ORCL:FRA2                                                                                                                                               PROVISIONED
[CANDIDATE]              ORCL:FRA1                                                                                                                                               FORMER

HEADER_STATUS column status for  disk

MEMBER -     Member status shows disk is part of ASM disk group .
PROVISIONED   - PROVISIONED status show , we can add this disk in disk group 
Former   - Former status show disk was part of our disk group 
==========================================================
1) To find out ASM disk to which need to add in exiting disk group

set linesize 200
col DISK_GROUP_NAME format a20;
col DISK_FILE_PATH format a25;
SELECT
 NVL(a.name, '[CANDIDATE]') disk_group_name
 , b.path disk_file_path
 , b.name disk_file_name
 , b.failgroup disk_file_fail_group
 ,b.header_status
 FROM
 v$asm_diskgroup a RIGHT OUTER JOIN v$asm_disk b USING (group_number)
 ORDER BY a.name;

DISK_GROUP_NAME      DISK_FILE_PATH            DISK_FILE_NAME                 DISK_FILE_FAIL_GROUP           HEADER_STATU
-------------------- ------------------------- ------------------------------ ------------------------------ ------------
DATA                                 ORCL:DATA1                        DATA1                                          DATA1                                               MEMBER
DATA                                 ORCL:DATA3                        DATA3                                          DATA3                                                 MEMBER
DATA                                 ORCL:DATA2                        DATA2                                          DATA2                                                  MEMBER
OCRVOTE                      ORCL:OCR_VOTE3            OCR_VOTE3                                    OCR_VOTE3                                      MEMBER
OCRVOTE                      ORCL:OCR_VOTE1            OCR_VOTE1                                    OCR_VOTE1                                      MEMBER
OCRVOTE                      ORCL:OCR_VOTE2            OCR_VOTE2                                     OCR_VOTE2                                     MEMBER
[CANDIDATE]              ORCL:OCR_VOTE4                                                                                                                                  PROVISIONED
[CANDIDATE]             ORCL:OCR_VOTE5                                                                                                                                  PROVISIONED
[CANDIDATE]              ORCL:FRA3                                                                                                                                               PROVISIONED
[CANDIDATE]              ORCL:FRA2                                                                                                                                               PROVISIONED
[CANDIDATE]              ORCL:FRA1                                                                                                                                               FORMER

2) To check the diskgroup size 

 select name, STATE,TOTAL_MB/1024 "Total GB",USABLE_FILE_MB/1024 "Free GB",(USABLE_FILE_MB/TOTAL_MB)*100 "% Free",TYPE from v$asm_diskgroup;
 
 NAME         STATE         Total GB    Free GB                 % Free                 TYPE
--------            -----------         ---------- ----------                     ----------             ------
OCRVOTE  MOUNTED     13.9951172     6.39453125      45.691159     NORMAL
DATA         MOUNTED         83.8330078     39.2246094     46.7889801     NORMAL

3) Add the disk in disk group off business hours then only you can start the re balancing operation .

Login to ASM instance 
#  sqlplus "/ sys as sysasm"

Then perform the below command .

alter diskgroup DATA ADD DISK 'ORCL:FRA1' rebalance power 4 ;

 4) Monitor the re-balancing operation from the sql prompt .


SQL> select INST_ID, OPERATION, STATE, POWER, SOFAR, EST_WORK, EST_RATE, EST_MINUTES from GV$ASM_OPERATION;

   INST_ID     OPERA STAT      POWER      SOFAR   EST_WORK   EST_RATE EST_MINUTES
    ----------         -----                     ----             ----------    ----------         ---------- ---------- -----------
         2 REBAL RUN                   4                  3           1    208                    240           5
         1 REBAL WAIT                  4

Monitoring the re-balancing operation from ASMCMD prompt 

[oracle@india2 ~]$ asmcmd
ASMCMD> lsop
Group_Name  Dsk_Num  State  Power
DATA        REBAL    RUN    4

5) Validate the disk is added in disk group or not .
  
set linesize 200
col DISK_GROUP_NAME format a20;
col DISK_FILE_PATH format a25;
SELECT
 NVL(a.name, '[CANDIDATE]') disk_group_name
 , b.path disk_file_path
 , b.name disk_file_name
 , b.failgroup disk_file_fail_group
 ,b.header_status
 FROM
 v$asm_diskgroup a RIGHT OUTER JOIN v$asm_disk b USING (group_number)
 ORDER BY a.name;

====================================================
Monitoring ASM alert log file while adding disk in exiting disk group 
===============================================================

  Added disk in the existing diskgroup and asm instance alert output

Asm alert logfile location --- /u01/app/oracle/diag/asm/+asm/+ASM1/trace   
  
alter diskgroup DATA ADD DISK 'ORCL:FRA1' rebalance power 4
=========================================================================
SQL> alter diskgroup DATA ADD DISK 'ORCL:FRA1' rebalance power 4
NOTE: GroupBlock outside rolling migration privileged region
NOTE: Assigning number (1,3) to disk (ORCL:FRA1)
NOTE: requesting all-instance membership refresh for group=1
NOTE: initializing header on grp 1 disk FRA1
NOTE: requesting all-instance disk validation for group=1
Sat Mar 25 08:32:09 2017
NOTE: skipping rediscovery for group 1/0x34570003 (DATA) on local instance.
NOTE: requesting all-instance disk validation for group=1
NOTE: skipping rediscovery for group 1/0x34570003 (DATA) on local instance.
Sat Mar 25 08:32:13 2017
GMON updating for reconfiguration, group 1 at 7 for pid 28, osid 19375
NOTE: group 1 PST updated.
NOTE: initiating PST update: grp = 1
GMON updating group 1 at 8 for pid 28, osid 19375
NOTE: PST update grp = 1 completed successfully
NOTE: membership refresh pending for group 1/0x34570003 (DATA)
GMON querying group 1 at 9 for pid 18, osid 8853
NOTE: cache opening disk 3 of grp 1: FRA1 label:FRA1
NOTE: Attempting voting file refresh on diskgroup DATA
NOTE: Refresh completed on diskgroup DATA. No voting file found.
GMON querying group 1 at 10 for pid 18, osid 8853
SUCCESS: refreshed membership for 1/0x34570003 (DATA)
Sat Mar 25 08:32:18 2017
SUCCESS: alter diskgroup DATA ADD DISK 'ORCL:FRA1' rebalance power 4
NOTE: starting rebalance of group 1/0x34570003 (DATA) at power 4
Starting background process ARB0
Sat Mar 25 08:32:18 2017
ARB0 started with pid=34, OS id=22674
NOTE: assigning ARB0 to group 1/0x34570003 (DATA) with 4 parallel I/Os
cellip.ora not found.
Sat Mar 25 08:32:48 2017
NOTE: Attempting voting file refresh on diskgroup DATA
NOTE: Refresh completed on diskgroup DATA. No voting file found.
Sat Mar 25 08:36:54 2017
NOTE: GroupBlock outside rolling migration privileged region
NOTE: requesting all-instance membership refresh for group=1
Sat Mar 25 08:36:57 2017
NOTE: membership refresh pending for group 1/0x34570003 (DATA)
Sat Mar 25 08:37:01 2017
GMON querying group 1 at 11 for pid 18, osid 8853
Sat Mar 25 08:37:09 2017
SUCCESS: refreshed membership for 1/0x34570003 (DATA)
NOTE: Attempting voting file refresh on diskgroup DATA
NOTE: Refresh completed on diskgroup DATA. No voting file found.
Sat Mar 25 08:40:04 2017
NOTE: stopping process ARB0
SUCCESS: rebalance completed for group 1/0x34570003 (DATA)
=================================================================

How to drop the disk from the exiting disk group , How to add disk with re-balance 0 option and other ASM topic , I will publish in next post . 


Thanks
Srinivasa 

Comments

Popular posts from this blog

Step by Step: How to troubleshoot a slow running query in Oracle

Register Archive log file manually in standby Database

How to check UNDO tablespace usage and who is using more undo