LinuxCommandLibrary

vgs

Display volume group information

TLDR

Display information about volume groups

$ vgs
copy

Display all volume groups
$ vgs [[-a|--all]]
copy

Change default display to show more details
$ vgs [[-v|--verbose]]
copy

Display only specific fields
$ vgs [[-o|--options]] [field_name_1],[field_name_2]
copy

Append field to default display
$ vgs [[-o|--options]] +[field_name]
copy

Suppress heading line
$ vgs --noheadings
copy

Use separator to separate fields
$ vgs --separator =
copy

SYNOPSIS

vgs [options] [VolumeGroupName [VolumeGroupName...]]

PARAMETERS

-a, --all
    Show all Volume Groups. Default is to show only those currently active.

-o, --options FieldList
    Specify the columns to display in the output. FieldList is a comma-separated list of field names.

-s, --short
    Produce brief output (no headers).

-v, --verbose
    Produce verbose output.

-h, --help
    Display help text and exit.

-V, --version
    Display version information and exit.

--units hHbBsSkKmMgGtTpPeE
    Display sizes in specified units. 'h' uses human-readable sizes (e.g., KB, MB, GB).

--separator Separator
    Use Separator instead of whitespace for separating fields.

--nameprefixes
    Add LVM2 name prefixes to the output.

--ignoreskippedcluster
    Skip clustered Volume Groups which are incomplete, for example due to node failure.

VolumeGroupName
    The name of a Volume Group to display information about. Multiple names can be specified.

DESCRIPTION

The vgs command in Linux is used to display information about existing Volume Groups (VGs). Volume Groups are a key component of the Logical Volume Manager (LVM), a system for managing disk drives and other block devices. LVM allows for flexible partitioning and resizing of storage volumes without requiring downtime. vgs provides a summary of the characteristics of one or more VGs, including their names, sizes, free space, number of Logical Volumes (LVs) and Physical Volumes (PVs) that constitute them, and other related attributes. The output can be customized using various options to show different fields and formats.
vgs is crucial for monitoring disk usage, planning storage expansion, and verifying the health of your LVM configuration. Without any arguments, it displays a concise overview of all VGs. With specific VG names as arguments, it focuses the output on those particular VGs. Understanding the output of vgs is essential for effectively managing storage resources in LVM-based environments. It allows system administrators to make informed decisions about allocating, resizing, and maintaining storage volumes. The command reads information directly from the LVM metadata stored on the PVs.

EXAMPLES

vgs: Shows all active Volume Groups.
vgs myvg: Shows information about the Volume Group named 'myvg'.
vgs -o vg_name,vg_size,vg_free: Shows only the name, size, and free space of all Volume Groups.

SEE ALSO

Copied to clipboard