In our current setup LVM is used on the KVM host as backing storage. There is at least one logical volume(LV) used as virtual hard disk for every virtual machine(VM). All VMs are deployed from the same template and therefore use the same name for the volume group inside. After a while we noticed that the KVM host reports that it has found multiple volume groups(VG) with the same name.
Nov 9 23:45:12 hostname: Multiple VGs found with the same name: skipping vg_system
This happens because the LVM tries to find all VGs on every block device. But it is possible to specify which devices should be scanned and which should be skipped in the file
/etc/lvm/lvm.conf. Have a look at the example below.
global_filter = [ "a|^/dev/md[0-9]+|", "r|.*/|" ]
This tells the LVM to scan all devices with
/dev/md[0-9] and reject all others. After a reboot the warning was gone and everything worked as expected.
Warning: Before changing the settings make sure you have backup and a rescue system to fix possible issues in you setup.