Configuring LVM filters for compute nodes
When a virtual machine uses logical volumes (LVs) for the system boot partition, improper LVM configuration on compute nodes can lead to issues during migration or upgrade operations. To ensure stability, the devices section in /etc/lvm/lvm.conf must be explicitly configured depending on whether LVM is used for system partitioning.
If LVM is not used for system partitioning
If you do not plan to use LVM for the VM system partition, all multipath devices must be excluded. This prevents LVs created on multipath-backed compute volumes from being activated on compute nodes.
Configure the filters as follows:
devices {
filter = [ "r|/dev/mapper/|" ]
global_filter = [ "r|/dev/mapper/|" ]
}
This configuration rejects any device under /dev/mapper/ and ensures that compute nodes ignore multipath-backed volumes entirely.
When LVM is used for system partitioning
If your VM uses LVM for the system partition, those devices must be explicitly allowed. In this case, you need to allow the correct disks using a reliable persistent identifier (for example, /dev/disk/by-id/<disk-id>) and reject all multipath devices.
Configure the filters as follows:
devices {
filter = [ "a|/dev/disk/by-id/<disk-id>.|", "r|/dev/mapper/" ]
global_filter = [ "a|/dev/disk/by-id/<disk-id>.|", "r|/dev/mapper/" ]
}
Replace <disk-id> with the actual identifier of the system disk. This ensures the system LVs activate correctly on the compute node while all multipath devices remain rejected.