Using vgs Command to Display Volume Groups Information

Posted on

To display an information about existing or available volume groups in a server, workstation or a host, there is only one way to do it in a simple way. It is done by executing or typing the suitable command in a bash prompt.

The command which should be typed is :

vgs

Below is sample of the output of the executed command :

[root@hostname ]# vgs
VG         #PV  #LV  #SN Attr   VSize   VFree
centos_noc   1    6    0 wz--n- 176.00g 4.00m
fc_vms       2   10    0 wz--n-   7.33t 3.74t
local_vms    1    1    0 wz--n- 381.39g 341.39g
[root@hostname ]# 

To be able to execute the above command, the first thing to be done is to check whether LVM or Logical Volume Management has already been installed in the Linux operating system which is used. By default, if the installation package is considered to be sufficed or enough and surpass the qualification, on Redhat Linux operating system LVM is installed by default.

But if it hasn’t been installed yet, especially in minimum installation mode, in order for ‘vgs’ command can be executed, LVM need to be installed.

Currently, there are two version available for LVM. The first one is LVM1.0 and the last is LVM2.0. When this article is created, the newst version, LVM2.0 is the one used for LVM (Logical Volume Management).

In Redhat, Fedora and CentOS or in other distribution which has any similar variant or flavor, using yum as its package management, this package which is needed for LVM can be checked whether it has already installed or not by typing the following command :

yum list installed | grep lvm

This is sample of the output from the above command’s execution :

[root@hostname ]# yum list installed | grep lvm
lvm2.x86_64                           7:2.02.130-5.el7_2.5           @updates
lvm2-libs.x86_64                      7:2.02.130-5.el7_2.5           @updates
[root@hostname]#

As it can be seen from the above output command’s execution, the LVM installed in the running host, workstation or server is LVM2.0. This will grant root or any administrator level account such as wheel to be able to execute ‘vgs’ command to view the information of volume group exist on the currently running server, host or workstation.

One thought on “Using vgs Command to Display Volume Groups Information

Leave a Reply