vgdisplay: Inspect LVM Volume Groups


vgdisplay: Inspect LVM Volume Groups

vgdisplay is a simple, read-only command that shows information about your LVM (Logical Volume Manager) volume groups. It helps you understand VG size, free space, and the layout of your storage pool.

Quick start

  • Display information about all volume groups (needs root):
sudo vgdisplay
  • Display information about a specific volume group named vg1:
sudo vgdisplay vg1

What you’ll see

When vgdisplay runs, you’ll typically see fields like:

  • VG Name
  • VG Size
  • Allocated PE / Free PE (physical extents) and Free PE
  • VG UUID
  • VG Access
  • VG Status
  • VG Tags
  • Allocation, Read/Write counts, and PE Size

These details help you assess how space is allocated and what’s available for creating logical volumes.

Practical examples

  • Check free space in all VGs to plan new logical volumes:
sudo vgdisplay | grep -E 'VG Name|Free  PE|PE Size'
  • See only a specific attribute for a quick read:
sudo vgdisplay vg1 | grep -E 'VG Size|Free'

Common pitfalls

  • Not using sudo (or root) can yield permission errors or partial output. vgdisplay reads system metadata stored in /etc/lvm and /dev/mapper, which often require elevated privileges.
  • If LVM tools aren’t installed, vgdisplay won’t be found. Install the package (varies by distro; e.g., on Debian/Ubuntu: sudo apt install lvm2).
  • Some environments hide lengthy output; pipe or grep to focus on what you need, as shown in the examples.
  • lvm: Overview and other LVM commands
  • pvdisplay: Physical volume information
  • lvdisplay: Logical volume information

More information

For deeper details and options, see the manual: https://manned.org/vgdisplay.

See Also