$linuxjunkies
>

vgs(8)

Display information about volume groups in LVM (Logical Volume Manager).

UbuntuDebianFedoraArch

Synopsis

vgs [OPTION]... [VolumeGroupName]...

Description

vgs lists all volume groups or specified volume groups with their attributes. It provides a quick overview of VG status, size, free space, and logical volume count. This is part of the LVM2 toolset for managing logical volumes.

By default, output is displayed in a columnar format with commonly used attributes. You can customize the columns displayed and format the output for scripting or further processing.

Common options

FlagWhat it does
-o, --optionsSpecify output columns; e.g., -o name,size,free shows name, total size, and free space
-a, --allInclude volume groups that are exported or inactive
-S, --selectFilter volume groups by selection criteria, e.g., -S 'size > 10G'
--noheadingsSuppress column headings from output
--rowsDisplay output one field per line instead of columnar format
--unitsSpecify output unit for size fields (h, b, s, k, m, g, t); default is 'k'
--separatorUse a custom separator for output fields instead of spaces
-v, --verboseShow additional detailed information

Examples

List all volume groups with default columns (name, size, free space, #LV, etc.)

vgs

Display only volume group name, total size, and free space

vgs -o name,size,free

List all volume groups with sizes displayed in gigabytes

vgs --units g

Show only volume groups larger than 10 gigabytes

vgs -S 'size > 10G'

Output volume groups without headers, using colon as field separator (useful for parsing)

vgs --noheadings --separator :

Display information about the specific volume group named 'myvg'

vgs myvg

Display volume groups in row format, one field per line for readability

vgs --rows

List all volume groups including exported and inactive ones

vgs -a

Related commands