diff --git a/udev/69-dm-lvm.rules.in b/udev/69-dm-lvm.rules.in index ff1568145..f7a6eef8f 100644 --- a/udev/69-dm-lvm.rules.in +++ b/udev/69-dm-lvm.rules.in @@ -10,6 +10,15 @@ SUBSYSTEM!="block", GOTO="lvm_end" ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="lvm_end" +# Ignore PVs on LVs. +# This is usually a case of an LV being used for a guest VM +# image, where the guest is using lvm. The host should +# ignore lvm data from the guest and not attempt to scan or +# activate guest PVs/LVs. (To enable functions in this file +# for PVs layered on LVs, set LVM_PVSCAN_ON_LVS="1" from a +# custom udev rule.) +ENV{ID_FS_TYPE}=="LVM2_member", ENV{DM_UUID}=="LVM-?*", ENV{LVM_PVSCAN_ON_LVS}!="1", GOTO="lvm_end" + # Only process devices already marked as a PV - this requires blkid to be called before. ENV{ID_FS_TYPE}!="LVM2_member", GOTO="lvm_end" ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="lvm_end"