Skip to content

LVM: use lvmetad; avoid gratuitous physical volume scans #37

Open
@jcnelson

Description

@jcnelson

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:

  • 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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions