$linuxjunkies
>

vgscan(8)

Scan all disks for volume group metadata and display information about discovered volume groups.

UbuntuDebianFedoraArch

Synopsis

vgscan [OPTION]...

Description

vgscan scans all block devices on the system to discover LVM volume groups (VGs) and physical volumes (PVs). It reads the metadata from these devices and reports what VGs are found. This command is useful for discovering VGs after adding new disks, restoring from backup, or troubleshooting LVM configurations.

The command updates the LVM metadata cache and can rebuild the device cache if needed. It does not modify any data but may create or update cache files in /etc/lvm/.

Common options

FlagWhat it does
-e, --exportedOnly report volume groups that have been exported
-n, --novolumegroupOnly report physical volumes with no assigned volume group
-P, --partialReport volume groups even if they have missing or inaccessible physical volumes
-c, --cacheScan devices and update the device cache without displaying VGs
-b, --blockdeviceReport physical volumes as block devices
-v, --verboseDisplay verbose output with additional details during scanning
-h, --helpShow help message and exit

Examples

Scan all disks and display all discovered volume groups with their properties

vgscan

Run vgscan with verbose output to see detailed information about discovered devices and VGs

vgscan -v

Scan and report partial volume groups (those missing some physical volumes)

vgscan -P

Update the LVM device cache without displaying the results

vgscan -c

Display only physical volumes that are not yet part of any volume group

vgscan -n

Show only exported volume groups (not available for use)

vgscan -e

Related commands