System and processes

The vgdisplay command

Long detail of each LVM volume group: size, extents and volumes.

Syntax

vgdisplay [opciones] [grupo...]Try it in the terminal →

Most useful options

-AShows only active groups, those with at least one active volume.
-cColon-separated output, meant for processing in a script.
-sOnly shows whether the group exists, without details.
-CShows the output in columns, like vgs. It accepts the same options as vgs.
-vMore detail in the messages. It can be repeated from 1 to 4 times.

Copy-ready examples

$ sudo vgslists the groups so you can choose the one to detail.
$ sudo vgdisplay datosshows the detail of the datos group.
$ sudo vgdisplay -s datosquickly checks that the group exists.
$ sudo vgdisplay -c datoscolon-separated output, to read it from a script.

You can try them in the browser terminal: it does not touch your computer.

Common errors

MessageCauseFix
Volume group "datos" not foundNo group has that name, or the group does not show up on this machine.List the groups with sudo vgs and use the exact name.

Typical mistakes

  • vgdisplay shows the group together with its associated PVs and LVs, so the output is long.
  • Free space appears in extents (PE), not in gigabytes. To see it in gigabytes, use vgs, which shows VFree in units.
  • vgdisplay is the long view. For a more compact and configurable view, vgs is the recommended option.

Differences from similar commands

  • vgs: shows a compact, configurable table. vgdisplay gives the long detail of each group.
  • lvdisplay: shows the detail of logical volumes, not of groups.
  • pvdisplay: shows the detail of the physical disks (PV) instead of the groups.

FAQ

What does vgdisplay show?

The attributes of each volume group, along with the PVs and LVs it contains.

Is there a more compact view?

Yes, vgs. It shows the same information in a column table you can choose with -o.

How do I process it in a script?

With -c the output is colon-separated. With -s you only check whether the group exists.

More System and processes commands

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course