This means that the LVM tools will scan the entire /dev tree looking for physical volumes, including the hardware database (which is big). As reported by Scooby, this means that each scan can take ~10 seconds; if the user has a lot of block devices, this means that coldplug processing can take a long time.
This is of course unacceptable. A few things need to happen:
The documentation needs to advise the user to add an LVM scan filter rule to exclude /dev/metadata and /dev/events (both of which are created by vdevd, and do not have block devices in them). Arguably, the documentation needs to also point the user towards the above bug report, and specifically recommend scanning only /dev/disk/by-id/scsi-* and /dev/disk/by-id/ata-*.
vdevd should attempt to avoid running pvs when processing a block device--it should only do so if the disk in question is in fact a physical volume for LVM.
vdevd should communicate with lvmetad to cache LVM metadata on a per-device basis, instead of performing gratuitous scans. The documentation needs to advise the user to run lvmetad when using vdevd with LVM.
It looks like this hasn't been fixed in Debian: https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/995709
This means that the LVM tools will scan the entire /dev tree looking for physical volumes, including the hardware database (which is big). As reported by Scooby, this means that each scan can take ~10 seconds; if the user has a lot of block devices, this means that coldplug processing can take a long time.
This is of course unacceptable. A few things need to happen:
/dev/metadata
and/dev/events
(both of which are created by vdevd, and do not have block devices in them). Arguably, the documentation needs to also point the user towards the above bug report, and specifically recommend scanning only/dev/disk/by-id/scsi-*
and/dev/disk/by-id/ata-*
.pvs
when processing a block device--it should only do so if the disk in question is in fact a physical volume for LVM.