vgscan(8)
Scan all disks for volume group metadata and display information about discovered volume groups.
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
| Flag | What it does |
|---|---|
-e, --exported | Only report volume groups that have been exported |
-n, --novolumegroup | Only report physical volumes with no assigned volume group |
-P, --partial | Report volume groups even if they have missing or inaccessible physical volumes |
-c, --cache | Scan devices and update the device cache without displaying VGs |
-b, --blockdevice | Report physical volumes as block devices |
-v, --verbose | Display verbose output with additional details during scanning |
-h, --help | Show help message and exit |
Examples
Scan all disks and display all discovered volume groups with their properties
vgscanRun vgscan with verbose output to see detailed information about discovered devices and VGs
vgscan -vScan and report partial volume groups (those missing some physical volumes)
vgscan -PUpdate the LVM device cache without displaying the results
vgscan -cDisplay only physical volumes that are not yet part of any volume group
vgscan -nShow only exported volume groups (not available for use)
vgscan -e