Displaying Volume Groups

There are two commands you can use to display properties of LVM volume groups: vgs and vgdisplay.

The vgscan command, which scans all the disks for volume groups and rebuilds the LVM cache file, also displays the volume groups.

The vgs command provides volume group information in a configurable form, displaying one line per volume group. The vgs command provides a great deal of format control, and is useful for scripting.

The vgdisplay command displays volume group properties (such as size, extents, number of physical volumes, etc.) in a fixed form. The following example shows the output of a vgdisplay command for the volume group new_vg. If you do not specify a volume group, all existing volume groups are displayed.

# vgdisplay new_vg
— Volume group —
VG Name new_vg
System ID
Format lvm2
Metadata Areas 3
Metadata Sequence No 11
VG Access read/write
VG Status resizable

DESCRIPTION

vgdisplay allows you to see the attributes of VolumeGroupName (or all volume groups if none is given) with it’s physical and logical volumes and their sizes etc.

vgs (8) is an alternative that provides the same information in the style of ps (1).

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.