Using lvs Command to Display Logical Volume Information

Posted on

Another article relate to Logical Volume Management discuss specifically how to display an information about existing or available logical volume in a server, workstation or a host with a specific command as one way to do it simply. The command itself must be executed in root privilege and it is generally typed in the bash prompt.

The command which should be typed is  :


The executed command output can be shown as follows  :

[root@hostname ~]#
LV                 VG           Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
root               server_noc01 -wi-ao----  50.00g
swap               server_noc01 -wi-ao----  64.00g
tmp                server_noc01 -wi-ao----   2.00g
var                server_noc01 -wi-ao----  50.00g
var_log            server_noc01 -wi-ao----   5.00g
var_log_audit      server_noc01 -wi-ao----   5.00g
server-apps        fc_vms       -wi-a-----  20.00g
server-dbdev       fc_vms       -wi-ao---- 800.00g
server-gantt       fc_vms       -wi-ao----  20.00g
server-uat         fc_vms       -wi-ao---- 120.00g
server-sit         fc_vms       -wi-ao---- 120.00g
server-production  fc_vms       -wi-ao---- 120.00g
internal-apps      fc_vms       -wi-ao----   1.10t
internal-origin    fc_vms       -wi-a-----   1.00t
repo-linux         fc_vms       -wi-ao---- 200.00g
repo-apps          fc_vms       -wi-ao---- 120.00g
db-pooling         local_vms    -wi-ao----  40.00g
[root@hostname ~]#

The above command used to display all logical volume created or available in host, workstation or server. As we can see, there are three volume groups available which contains many logical volumes for each of the volume groups.

The logical volume exist when the volume group has already been created. And the command of ‘lvs’ along with the other command related with Logical Volume Management can only be executed only if LVM or Logical Volume  Management has already been installed in the Linux operating system which is operated.

To be able to check whether it has already installed or not in Redhat, Fedora and CentOS or in other distribution which has any similar variant or flavor, yum can be used as one of package management tool exist to check whether it has already installed or not by typing the following command :

yum list installed | grep lvm

When the article is created, LVM is in LVM 2.0 and that is the one currently used for the purpose of managing Logical Volume.

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

The above output command display the installed package of LVM in operating system. It is LVM2.0 and with this package installed root, super admin or wheel group admin can execute ‘lvs’ command for retrieving information about logical volume created.

2 thoughts on “Using lvs Command to Display Logical Volume Information

Leave a Reply