pvscan

Scan and discover LVM physical volumes

TLDR

List all physical volumes
$ sudo pvscan
Show volume group using a PV
$ sudo pvscan --cache --listvg [/dev/sdX]
Show logical volumes using a PV
$ sudo pvscan --cache --listlvs [/dev/sdX]
Output in JSON format
$ sudo pvscan --reportformat json

SYNOPSIS

pvscan [--cache] [--listvg] [--listlvs] [--reportformat format] [device...]

DESCRIPTION

pvscan scans for LVM physical volumes and lists them. It can update the LVM metadata cache and report which volume groups and logical volumes are present on specific devices.The command is useful for discovering physical volumes after adding new disks and for troubleshooting LVM configuration issues.

PARAMETERS

--cache

Update LVM metadata cache
--listvg
List volume group of specified device
--listlvs
List logical volumes on specified device
--reportformat _format_
Output format (basic, json)
-v, --verbose
Verbose output

INSTALL

sudo apt install lvm2
sudo dnf install lvm2
sudo pacman -S lvm2
sudo apk add lvm2
sudo zypper install lvm2
nix profile install nixpkgs#lvm2

CAVEATS

Requires root privileges. Results depend on device availability. Cache updates may be needed after hardware changes. Use with --cache for udev integration.

HISTORY

pvscan is part of LVM2 (Logical Volume Manager). It provides physical volume discovery functionality essential for dynamic LVM management.

SEE ALSO

pvs(8), pvdisplay(8), vgscan(8), lvscan(8)