Disclaimer

Sunday 11 July 2021

How to Create ASM Diskgroup

There are several ways to create the Diskgroup in ASM 

(eg Using OEM, ASMCA,ASMCMD,SQLPLUS). 

I will explain some of them in this post.

Check available candidate (Free) Disks
We need free disks which we can use to create the diskgroup. Again there are several ways to check the same. I am checking it here using asmcmd


$asmcmd lsdsk --candidate -p




Creating Disk Groups Using SQL statement

SQL> create diskgroup TEST_DG normal redundancy disk 'AFD:TEST06','AFD:TEST07';





Creating Disk Group Using ASMCA

$asmca -silent -createDiskGroup -diskGroupName TEST_DG -diskList  'AFD:TEST06','AFD:TEST07' -redundancy normal





Creating Disk Group Using ASMCMD

Creating a DiskGroup using asmca requires to create the xml configuration file first. The xml configuration file is then used as input parameter to asmcmd mkdg to create the diskgroup.

Configure XML Configuration File

[oragrid@TEST05]$cat create_dg.xml
<dg name="TEST_DG">
     <fg name="FG1" >
       <dsk string="AFD:TEST06" />
     </fg>
     <fg name="FG2" >
       <dsk string="AFD:TEST07" />
     </fg>
     <a name="compatible.asm" value="12.2.0.1.0" />
         <a name="compatible.rdbms" value="12.2.0.1.0" />
   </dg>



$asmcmd mkdg create_dg.xml







Redundancy Level of the ASM Disk Group
> EXTERNAL REDUNDANCY (no mirroring )
> NORMAL REDUNDANCY (two-way mirroring)
> HIGH REDUNDANCY(three-way mirroring)
> FLEX REDUNDANCY (two-way mirroring,three-way mirroring,unprotected(nomirroring ))
> EXTENDED REDUNDANCY (two-way mirroring,three-way mirroring,unprotected(nomirroring ))


Note1: DG with NORMAL or HIGH redundancy can be migrated to a FLEX redundancy. However you cannot migrate an EXTERNAL disk group to a FLEX redundancy disk group.

Note2: For FLEX and EXTENDED redundancy disk groups, the disk group redundancy cannot be changed. However, the redundancy of the files in the disk group can be changed by modifying the REDUNDANCY property of the respective file group.

Discussion about FLEX disgroup, Flex Redundancy and FileGroup is not the topic for this post and will write separate post on this.





No comments:

Post a Comment

100 Oracle DBA Interview Questions and Answers

  Here are 100 tricky interview questions tailored for a Senior Oracle DBA role. These questions span a wide range of topics, including perf...