How to Add Disks in oracle ASM diskgroup for RAC & Standalone DB

 


How to add disks in ASM Diskgroup in RAC/STANDALONE in oracle DBA 19c/18c/12c.

Description:-

  • Expand Storage Capacity:- As your database grows, you may need more storage space. Adding a new disk allows you to increase the available storage without downtime or complex reconfiguration.
  • Improve Performance:- By adding additional disks, ASM can better distribute data, which can reduce I/O bottlenecks and enhance overall database performance. More disks mean more spindles to spread out the load, leading to faster read/write operations.
  • Enhance Redundancy and Reliability:- In an environment where data protection is critical, adding disks to a Diskgroup can improve redundancy. ASM can use the extra disks to mirror data, ensuring that if one disk fails, the data remains accessible.
  • Facilitate Maintenance:- Adding disks can also be a proactive maintenance step. For example, if you plan to decommission older disks, adding new ones ensures a smooth transition with minimal impact on the database's availability.

Adding a disk  to an ASM (Automatic Storage Management) disk group in Oracle, whether in a RAC (Real Application Clusters) environment or a standalone setup, involves as few steps. 

Prerequisites:-

  • Whenever we add the disk in disk group, The header_status it need to CANDIDATE & FORMER.
  • Before adding any disk to the diskgroup, that time we  have to set the asm_power_limit(this parameter is used for auto rebalancing) to zero.
  • Using ALTER DISKGROUP command we add the new disk in diskgroup.
  • whenever you add disk in diskgroup that time you have ensure that the rebalance power is depending open our CPU threads.
  • After the rebalance is complete, ensure that the disk group is functioning correctly by checking the overall status of health.
  • once the rebalance is competed then set the asm_power_limit to zero or one.
  • kindly refer to the NOTE section in the Blog for more details.
STEP 1 :- Login the ASM/Grid(ASM1/ASM) environment.
asmcmd -p
lsdg  or asmcmd lsdg

STEP 2 :- Checking the disk status in OS level using ASMCMD utility.
lsdg -G DG_GANI  (DISKGROUP name - DG_GANI)
diskinfo /dev/sda/dg_01  (/dev/sda  --> Physical location of disk.)
kfed read /dev/sda/dg_01 (dg_01 --> Disk name)

STEP 3 :- login to the ASM instance.
e.g : - sqlplus / as sysasm 'or' sqlplus grid/password
set lines 200 pages 200
col path for a70
col name for a40
select name,path,header_status from v$asm_disk where header_status='CANDIDATE' order by 2;
select name,free_mb/1024 as FREE_GB, total_mb/1024 TOTAL_GB from v$asm_diskgroup;

STEP 4 :- 
show parameter power;
alter system set asm_power_limit=0;

STEP 5 :- 
alter diskgroup DG_GANI  add disk '/dev/sda/dg_01','/dev/sda/dg_02','/dev/sda/dg_03' rebalance power 12;   (Using this Single line command we have add multiple disk  )
"OR" 
alter diskgroup DG_GANI add disk '/dev/sda/dg_01';
alter diskgroup DG_GANI add disk '/dev/sda/dg_02';
alter diskgroup DG_GANI add disk '/dev/sda/dg_03';

STEP 6 :- 
alter diskgroup DG_GANI rebalance power 12;

IMP : ALTER DISKGROUP DG_GANI REBALANCE MODIFY POWER 10;  DG_GANI(You can increase & Decrease the rebalance.)
select * from v$asm_operaton; - (To check the rebalancing status )

STEP 7 :- 
alter system set asm_power_limit=0;

NOTE:-

  • RAC : -
            If we add new disk in diskgroup in RAC environment, It should be present in all node of RAC environment and it need to be physically present.
    In RAC database you can add in ONE ASM instance and it will reflated in all instance of RAC once the rebalance was completed..
           If you want check at ASMCMD utility the it will be show  'Y' it means the rebalance is running and if  it is showing 'N' it means rebalance was completed.
  • STANDALONE :-
        If we add new disk in diskgroup in standalone environment,
it need to be physically present.
  • ASM Disk HEADER_STATUS :-
      Majorly FORMER,CANDIDATE & MEMBER  are on Priority.
  • FORMER – Once used, can be re-used.
  • CANDIDATE – Can be used and it is a fresh/new disk.
  • MEMBER – Already member of a diskgroup.
  • UNKNOWN – ASM disk header has not been read, Physically not present.
  • INCOMPATIBLE – Version number in the disk header is not compatible with the ASM version.
  • PROVISIONED – Disk is not part of a disk group and may be added to a disk group.
  • CONFLICT – ASM disk was not mounted due to a conflict or error.
  • Basic OS Commands :-
  • asmcmd : This is the oracle utility.
  • -p            : Physical path.
  • lsdg         : List diskgroup.
  • diskinfo  : It show all the information of particular disk.
  • kfed read : It read the disk at OS level.
  • lsdg -G diskgroup_name : It is showing the physical patch of particular disk.
  • V$ASM_OPERATION :-
  • RESTORE (default) :-  It has 3 option are RESYNC, RESILVER & RESTORE.
  •  RESYNC:- Synchronizes a temporarily offline disk with the rest of the diskgroup when it come back online.
  •  RESILVER:- Restore redundancy by redistributing data across remaining and new disk after a disk failure.
  •  RESTORE:- Restore lost data from backups when ASM redundancy is insufficient to protect against data lose.
  1.  BALANCE :It is a restores redundancy of  all the disks in the disk group and also balances extents on Oracle ASM disks in diskgroup.
  2.  PREPARE : It completes the work corresponding to the prepare SQL operation in ASM instances.
  3. COMPACT : It is de-fragments and compacts extents across Oracle ASM disks.

IMP :-   If ORA-59000 error at the end of the rebalance if all rebalance is not done.
      if you easy find any oracle error without searching then use (oerr ora 59000 at OS level)

16 Comments

Comments :

Previous Post Next Post