How to check DG size in Veritas File System

How to check DG size in Veritas File System

How to check DG size in Veritas File System

In this article, we are going to share how to check DG size in Veritas File System. If you have worked on Veritas Volume Manager earlier you may be aware that DG stands for Disk Group in Veritas File System.

Like LVM Logical Volume Manager in RHEL which is shipped with base OS for File System Management in Linux Servers with no additional charge for it. Veritas File System is also Volume Management Software which has many additional advantages as compared to LVM.


Let us view some key points and commands which is definitely going to help you to understand it properly and we will finally check what are options available related to the topic which is how to check DG size in Veritas File System.

Veritas File System

How to Check DG name in Veritas File System

Let us start with simply how to check DG name in the Veritas File System.vxdg command for managing Veritas File System.

Let us understand using examples.

$sudo vxdg list
NAME         STATE           ID
fs_sms-dg    enabled         1302958046.36.lnxsrv01

How to check free space in DG in Veritas File System

vxdg command in the veritas file system will tell you to show you all disk technical details of all the disks in a specific disk group.DG must be in the mounted state. This output will be in block sizes which is difficult to understand.

$sudo vxdg free
GROUP         DISK                   DEVICE                              TAG                                  OFFSET       LENGTH        FLAGS
Fs_sms-dg    HITACHID01c5 tagmastore-usp1_05c2 tagmastore-usp1_05c2 62297088  42476800  -
fs_pms-dg    HITACHID21D  hitachi_vspg1k0_021d hitachi_vspg1k0_021d 0         3328      -
fs_pms-dg    HITACHID21E  hitachi_vspg1k0_021e hitachi_vspg1k0_021e 0         3328      -
fs_pms-dg    HITACHID21F  hitachi_vspg1k0_021f hitachi_vspg1k0_021f 0         3328      -
fs_pms-dg    HITACHID216  hitachi_vspg1k0_0216 hitachi_vspg1k0_0216 0         3328      -
fs_pms-dg    HITACHID217  hitachi_vspg1k0_0217 hitachi_vspg1k0_0217 0         3328      -
fs_pms-dg    HITACHID218  hitachi_vspg1k0_0218 hitachi_vspg1k0_0218 0         3328      -
fs_pms-dg    HITACHID220  hitachi_vspg1k0_0220 hitachi_vspg1k0_0220 0         3328      -
$sudo vxdg -g fs_pms-dg free
DISK                     DEVICE                              TAG                                    OFFSET                 LENGTH              FLAGS
HITACHID01c5  tagmastore-usp1_05c2  tagmastore-usp1_05c2 62297088             42476800  -
HITACHID21D    hitachi_vspg1k0_021d   hitachi_vspg1k0_021d   0                3328      -
HITACHID21E    hitachi_vspg1k0_021e   hitachi_vspg1k0_021e   0                3328      -
HITACHID21F    hitachi_vspg1k0_021f   hitachi_vspg1k0_021f    0               3328      -
HITACHID216    hitachi_vspg1k0_0216   hitachi_vspg1k0_0216   0                3328      -
HITACHID217    hitachi_vspg1k0_0217   hitachi_vspg1k0_0217   0                3328      -
HITACHID218    hitachi_vspg1k0_0218   hitachi_vspg1k0_0218   0                3328      -
HITACHID220  hitachi_vspg1k0_0220 hitachi_vspg1k0_0220        0               3328      -

vxdg command is also very handy in case if you want to reclaim disks from the server. You need to match the Length of the device and if it shows the same length then without impact you can remove the device from the disk group and submit a request for reclaiming those devices permanently from the server.

Linux Virtual Machine

How to Check free space in DG under Veritas File System

System administrators frequently get requests to expand the file systems as per business requirements which can be easily achieved in just two to three steps. See the full procedure on how to increase veritas file system under RHEL, Solaris, HP-UX, etc.

$ sudo vxassist -g <DG Name> maxsize  
$sudo vxassist -g rootdg maxsize
Maximum volume size: 282624 (138Mb)
If you only want to see space available you can use the below 
variant of the same command.
$ sudo vxassist -g <DG Name> maxsize| awk '{print $5}'
$sudo vxassist -g rootdg maxsize| awk '{print $5}'

In the Veritas File System, it is very easy to know how much space is free in DG using vxassist command but comparatively, there is no direct option or command available to check total space in Disk Group. Likewise in Linux under LVM, it is quite similar.

#vgdisplay <VG name> name
# vgdisplay EsbVg
  --- Volume group ---
  VG Name               EsbVg
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <127.00 GiB
  PE Size               4.00 MiB
  Total PE              32511
  Alloc PE / Size       25600 / 100.00 GiB
  Free  PE / Size       6911 / <27.00 GiB
  VG UUID               3257AM-T8VW-ntNg-z5Pv-nfAb-K82j-qY5y7j

 Total Size of VG = PE Size  4.00 MiB X Total PE 32511=Results in MB

 Total Size of VG = PE Size  4.00 MiB X Total PE 32511/1024 = Results in GB

You need to calculate so as with Veritas Volume Manager as well>You can utilize vxprint command to have all the volumes space in MB/GB which is more readable and understandable.

The same way using vxprint command and awk command to apply a formula to have space visible in MB and GB for all the volumes in Disk Group may help up to great extent and it will resolve our query.

# vxprint -g <DG Name> | grep ^v | awk '{print "Volume : " $2" " $5/2/1024 " MB (" $5/2/1024/1024 "GB)"}'
# vxprint -g fs-general-dg | grep ^v | awk '{print "Volume : " $2" " $5/2/1024 " MB (" $5/2/1024/1024 "GB)"}'
Volume : delphix_svc 8192 MB (8GB)
Volume : vol001_8GB 8192 MB (8GB)
Volume : vol002_6GB 6144 MB (6GB)
Volume : vol003_2GB 53248 MB (52GB)

Total DG Size = Sum of all volume space in Disk Group.
Veritas Cluster File System

That is it about how to check DG size in Veritas File System. I guess this will help up to great extent in finding the Total Size of DG under Veritas File System. If you like it please subscribe to our blog and get many more such how-to tips on UNIX Linux Veritas File System and many other valuable how to stuff and increase your expertise level to succeed in your role.

Conclusion: Veritas have completed 25 years of operations in India recently and they got the reputation for being one of the best volume manager in the industry and they provide net backup solutions as well.

Veritas Volume Manager works perfectly well on major UNIX Linux related operating systems like Solaris, RHEL, HP-UX, AIX, and even on Windows platforms. The only drawback is licensed based.

But VXVM and even LVM lacking in providing small tools to directly see the space in DG. Considering all the available facts I guess the above-mentioned method is best to get  DG size in Veritas File System.

Please share your opinion on this in the form of comments and let our readers get benefited from any other excellent ideas on how to achieve this goal.