1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 01:55:10 +03:00
lvm2/man/pvscan.8_des

60 lines
1.8 KiB
Plaintext
Raw Normal View History

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
2018-11-14 18:34:30 +03:00
When the --cache and -aay options are used, pvscan records which PVs are
available on the system, and activates LVs in completed VGs. A VG is
2018-11-14 02:23:32 +03:00
complete when pvscan sees that the final PV in the VG has appeared. This
is used by event-based system startup (systemd, udev) to activate LVs.
2021-04-16 16:57:01 +03:00
.P
2018-11-14 02:23:32 +03:00
The four main variations of this are:
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
2018-11-14 02:23:32 +03:00
If device is present, lvm adds a record that the PV on device is online.
If device is not present, lvm removes the online record for the PV.
In most cases, the pvscan will only read the named devices.
2021-04-16 16:57:01 +03:00
.P
2018-11-14 02:23:32 +03:00
.B pvscan --cache -aay
.IR device ...
2021-04-16 16:57:01 +03:00
.P
2018-11-14 18:34:30 +03:00
This begins by performing the same steps as above. Afterward, if the VG
for the specified PV is complete, then pvscan will activate LVs in the VG
(the same as vgchange -aay vgname would do.)
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
.P
2018-11-14 18:34:30 +03:00
This first clears all existing PV online records, then scans all devices
on the system, adding PV online records for any PVs that are found.
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
2018-11-14 02:23:32 +03:00
This begins by performing the same steps as pvscan --cache. Afterward, it
activates LVs in any complete VGs.
2021-04-16 16:57:01 +03:00
.P
To prevent devices from being scanned by pvscan --cache, add them
to
.BR lvm.conf (5)
.B devices/global_filter.
For more information, see:
.br
.B lvmconfig --withcomments devices/global_filter
2021-04-16 16:57:01 +03:00
.P
Auto-activation of VGs or LVs can be enabled/disabled using:
.br
.BR lvm.conf (5)
.B activation/auto_activation_volume_list
2021-04-16 16:57:01 +03:00
.P
For more information, see:
.br
.B lvmconfig --withcomments activation/auto_activation_volume_list
2021-04-16 16:57:01 +03:00
.P
2018-11-14 02:23:32 +03:00
To disable auto-activation, explicitly set this list to an empty list,
i.e. auto_activation_volume_list = [ ].
2021-04-16 16:57:01 +03:00
.P
2018-11-14 02:23:32 +03:00
When this setting is undefined (e.g. commented), then all LVs are
auto-activated.