LinuxCommandLibrary

vgdisplay

Display volume group information

TLDR

Display information about all volume groups

$ sudo vgdisplay
copy

Display information about volume group vg1
$ sudo vgdisplay [vg1]
copy

SYNOPSIS

vgdisplay [OPTIONS] [VolumeGroupName...]

Displays detailed information about LVM volume groups. If VolumeGroupName is omitted, information for all volume groups is shown.

PARAMETERS

-v, --verbose
    Enables verbose output, showing more details about the volume group, including information about contained physical and logical volumes.

-C, --colon
    Generates colon-separated output. This format is designed to be easily parseable by scripts and other programs.

-s, --short
    Displays a short summary of volume groups, providing a less detailed overview than the default or verbose modes.

-o <fields>, --options <fields>
    Specifies a comma-separated list of fields to display. This allows users to customize the output to show only specific attributes (e.g., 'vg_name,vg_size,vg_free').

--units <units>
    Specifies the units for displayed sizes. Common units include 'b' (bytes), 'k' (kilobytes), 'm' (megabytes), 'g' (gigabytes), 't' (terabytes), 'p' (petabytes), 'e' (exabytes).

VolumeGroupName...
    One or more specific volume group names to display information for. If omitted, vgdisplay shows information for all active volume groups on the system.

DESCRIPTION

The vgdisplay command is a fundamental utility within the Logical Volume Manager (LVM) framework on Linux systems. It is used to present comprehensive information about volume groups (VGs). A volume group is a storage pool composed of one or more physical volumes (PVs), from which logical volumes (LVs) are carved out.

When executed, vgdisplay provides a detailed overview of a specified volume group or all volume groups if none are specified. This includes critical metrics such as the VG's size, the amount of free space available, the number of physical volumes it contains, the number of logical volumes derived from it, and various metadata attributes like VG UUID, allocation policy, and more. It's an essential command for system administrators to monitor, plan, and troubleshoot LVM storage configurations, as it offers a read-only snapshot of the current state of VGs.

CAVEATS

Caveats: vgdisplay is a read-only command; it does not modify the LVM configuration or data.
Full detailed output (especially with -v) can be extensive, making it suitable for in-depth analysis rather than quick checks.
Requires appropriate user permissions (typically root or via sudo) to access LVM metadata and display all system-wide volume groups.

COMPARISON WITH <B>VGS</B>

While vgdisplay provides comprehensive, multi-line output for detailed analysis of volume groups, the vgs command offers a concise, one-line summary of volume group information. For quick checks of free space, size, and PV/LV counts, vgs is often preferred due to its brevity, whereas vgdisplay is used for in-depth inspection and troubleshooting.

UNDERSTANDING OUTPUT FIELDS

The output of vgdisplay typically includes numerous fields. Key fields include: VG Name (the name of the volume group), VG Size (total capacity), VG Free (available space), PE Size (Physical Extent size, the smallest unit of allocation), Total PE and Alloc PE / Free PE (counts of physical extents). Understanding these fields is crucial for managing LVM storage effectively.

HISTORY

The vgdisplay command is an integral part of the Logical Volume Manager (LVM) framework, which was first introduced into the Linux kernel in version 2.4. LVM provides an abstraction layer over physical storage devices, allowing for flexible storage management. vgdisplay has been a core utility since the early days of LVM, evolving with the LVM feature set to provide increasingly comprehensive views of volume group attributes. Its fundamental purpose—displaying VG details—has remained consistent, making it a cornerstone for LVM administration.

SEE ALSO

pvdisplay(8), lvdisplay(8), vgs(8), pvs(8), lvs(8), vgcreate(8), vgextend(8), vgreduce(8)

Copied to clipboard