Tuesday, 3 April 2018

How to remove all disks from a cellserver

Assume we have the following 3 Disks groups
   DATA  ( Database)
   FRA  ( for Archive log/FRA )
   SYSTEM ( After os partition )














Verify if you have enough usable space ( very important thing before you drop)


Before you drop the disks, you need to check the DG redundancy and the free usable space whether after the disk drop, the usable free space can accommodate the rebalance






A,1 Get the below values from the ASM instance


select sum(total_mb) from v$asm_disk where failgroup='CELLSERVER01' and lower(name) like '%data%';
select sum(total_mb) from v$asm_disk where failgroup='CELLSERVER01 and lower(name) like '%fra%';
 select sum(total_mb) from v$asm_disk where failgroup='CELLSERVER01' and lower(name) like '%system%';


 


 A.2 Depends on the redundancy  divide the value by 3 or 2 ( High – 3, normal -2)   )




select sum(total_mb) from v$asm_disk where failgroup='CELLSERVER01 and lower(name) like '%fra%';





SUM(TOTAL_MB)


-------------


       344080     total MB for one cell in FRA without redundancy (with normal redundancy approx 344/2 = 172 GB free space needed)  ( High – 3, normal -2)  













A.3) Validate using  lsdg




ASMCMD> lsdg
State    Type    Rebal  Sector  Block       AU   Total_MB    Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  NORMAL  N         512   4096  4194304  298592448  124655796          3554672        60550562              0             N  DATA/
MOUNTED  NORMAL  N         512   4096  4194304    2422560     118196            34608           41794              0             Y  FRA/
MOUNTED  NORMAL  N         512   4096  4194304   18930240   17817060           225360         8795850              0             N  SYSTEM


Note : if we don't have enough usable space to accommodate the rebalance, only option is that increase DISK_REPAIR time .We may loose data if any other failgroup goes down ( 1 for normal, 2 for high)










Drop all Disks
for a cellserver maintenenace, if we want to remove all the disks from the above DGs




  alter diskgroup DATA drop disks in failgroup cellserver01rebalance power 60;
  alter diskgroup FRA drop disks in failgroup cellserver01rebalance power 60;
  alter diskgroup SYSTEM drop disks in failgroup cellserver01rebalance power 60;


- - Monitor v$asm_operation










Add the Disks Back


( why we use two ip-addreses here? from X4 onwards infiniband is in active -active mode )


To add all disks from once cell server in a single command
       ALTER DISKGROUP DATA ADD DISK 'o/10.10.10.1;10.10.2/DATA_DG_CD*' rebalance power 60 NOWAIT;
       ALTER DISKGROUP FRA ADD DISK 'o/10.10.10.1;10.10.2/FRA_DG_CD*' rebalance power 60 NOWAIT;
       ALTER DISKGROUP SYSTEM ADD DISK 'o/10.10.10.1;10.10.2/SYSTEM_DG_CD*' rebalance power 60 NOWAIT;


- Monitor v$asm_operation





No comments:

Post a Comment

ZFS

Public Cloud tools comparison