2018-11-14 02:23:32 +03:00
When called without the --cache option, pvscan lists PVs on the system,
like
.BR pvs (8)
or
.BR pvdisplay (8).
2021-04-16 16:57:01 +03:00
.P
2021-11-25 01:03:39 +03:00
When --cache is used, pvscan updates runtime lvm state on the system, or
with -aay performs autoactivation.
2021-04-16 16:57:01 +03:00
.P
2018-11-14 02:23:32 +03:00
.B pvscan --cache
2021-04-16 16:57:01 +03:00
.I device
.P
2021-11-25 01:03:39 +03:00
If device is present, lvm records that the PV on device is online.
2018-11-14 02:23:32 +03:00
If device is not present, lvm removes the online record for the PV.
2021-11-25 01:03:39 +03:00
pvscan only reads the named device.
2021-04-16 16:57:01 +03:00
.P
2021-11-25 01:03:39 +03:00
.B pvscan --cache
2021-04-16 16:57:01 +03:00
.P
2021-11-25 01:03:39 +03:00
Updates the runtime state for all lvm devices.
2021-04-16 16:57:01 +03:00
.P
2021-11-25 01:03:39 +03:00
.B pvscan --cache -aay
.I device
2021-04-16 16:57:01 +03:00
.P
2021-11-25 01:03:39 +03:00
Performs the --cache steps for the device, then checks if the VG using the
device is complete. If so, LVs in the VG are autoactivated, the same as
vgchange -aay vgname would do. (A device name may be replaced with major
and minor numbers.)
2021-04-16 16:57:01 +03:00
.P
2018-11-14 02:23:32 +03:00
.B pvscan --cache -aay
2021-04-16 16:57:01 +03:00
.P
2021-11-25 01:03:39 +03:00
Performs the --cache steps for all devices, then autoactivates any complete VGs.
2021-04-16 16:57:01 +03:00
.P
2021-11-25 01:03:39 +03:00
.B pvscan --cache --listvg|--listlvs
.I device
.P
Performs the --cache steps for the device, then prints the name of the VG
using the device, or the names of LVs using the device. --checkcomplete
is usually included to check if all PVs for the VG or LVs are online.
When this command is called by a udev rule, the output must conform to
udev rule specifications (see --udevoutput.) The udev rule will use the
results to perform autoactivation.
2021-04-16 16:57:01 +03:00
.P
2021-11-25 01:03:39 +03:00
Autoactivation of VGs or LVs can be enabled/disabled using vgchange or
lvchange with --setautoactivation y|n, or by adding names to
2015-05-01 21:44:31 +03:00
.BR lvm.conf (5)
.B activation/auto_activation_volume_list
2021-04-16 16:57:01 +03:00
.P
2021-11-25 01:03:39 +03:00
See
.BR lvmautoactivation (7)
for more information about how pvscan is used for autoactivation.