ASMCMD Creating Disk Groups In Easy Way….

Just a small thing which is there in 11.2 (AFAIK) that using the ASMCMD itself, we can create now the disk groups. It needs an XML file to be there which should have the configuration details of the disk group. An example XML file is given below,

<dg name="DATA" redundancy="external">
<dsk string="ORCL:ASMDISK1"/>
<dsk string="ORCL:ASMDISK2"/>
<dsk string="ORCL:ASMDISK2"/>
<a name="compatible.asm" value="11.2"/>
<a name="compatible.rdbms" value="11.2"/>
<a name="compatible.advm" value="11.2"/>
</dg>

 

Now, we can use this file as input to the ASMCMD’s mkdg command and can create the disk group silently. If no errors are there in the file, the command would work flawlessly.

[grid@myhost ~]$ asmcmd mkdg DATA.xml
[grid@myhost ~]$ asmcmd
ASMCMD> lsdg data
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  1048576      9998     9070              245            4412              0             N  DATA/

 

Not a ground breaking revelation but if you are a CLI fan, this is just another goodie for you. ASMCM of 11.2 has some 50+ commands doing tons of stuff, enjoy 🙂 .