I have a Debian server running KVM+libvirt. The VMs disks are LVs on the host. The trouble is that if I create LVs inside the guests, they are recursively detected on the host and that creates all sort of problems, like the inability to resize or delete properly LVs.
So I added a filter rule to
/etc/lvm/lvm.conf like this, to exclude scanning LVs inside other LVs:
filter = [ "r|/dev/dm-*|", "a|/dev/sd.*|" ]
Now my problem is : how do I get LVM to rescan only the "real" VGs and LVs? I now have errors like this:
# lvs WARNING: Device for PV 73C0Ma-sAYV-Aa10-pAHB-ZAZA-3QjH-Rk1eTS not found or rejected by a filter. WARNING: Device for PV fcEG5k-BLzO-dbAr-Yw8o-dPw2-1hAk-VyluvW not found or rejected by a filter. LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert HaProxy data -wi-ao---- 20,00g backup data -wi-ao---- 4,00t database data -wi-ao---- 16,00g lvol0 data swi-a-s--- 16,07g stone-web 70,43 stone-vtls data -wi-ao---- 2,00t stone-web data owi-aos--- 16,00g lv0 ftpstorage -wi-----p- 10,00t
The last lv in this case is actually a LV from a VM, not from the host... How do I get rid of it without rebooting the host?