Hide Forgot
+++ This bug was initially created as a clone of Bug #1674563 +++ It is a huge support issue that hypervisors are able to see the volume groups created within VMs. The host machine will create logical volumes that then become the system disk for virtual machines. Those virtual machines then create volume groups of their own on those disks. Ideally, the host ignores them; but instead, the opposite is true. The host scans its own LVs for labels and discovers the volume groups (and associated LVs) created by the VMs. Support has been reporting problems where tools on the hypervisor are damaging VMs because they are writing to their (private LVs). This can be avoided if we simply do not scan LVs for labels. We can do this by switching the default setting in lvm.conf of: devices/scan_lvs = 1 to devices/scan_lvs = 0 --- Additional comment from Jonathan Earl Brassow on 2019-02-12 15:53:01 UTC --- The noticeable, testable effect of this change will be that VGs that are created from a LV (or group of LVs) will no longer be visible or auto-activated.
I believe we can save our support organization a lot of headaches by making this change. I've spoken with the GSS team and they agree that making this default change would save them a lot of calls and trouble. We are in the process of changing this default value for the next RHEL7 minor release. If we can't make this change in RHEL8.0, we would certainly do it in RHEL8.1. It would be a shame if we could not start out RHEL8 with the defaults the way we have recently learned would provide the most benefit.
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=7be6791e707da333e56aea3cc50c079ab6207bad
Marking verified in the latest rpms. kernel-4.18.0-71.el8 BUILT: Fri Feb 22 17:00:18 CST 2019 lvm2-2.03.02-6.el8 BUILT: Fri Feb 22 04:47:54 CST 2019 lvm2-libs-2.03.02-6.el8 BUILT: Fri Feb 22 04:47:54 CST 2019 device-mapper-1.02.155-6.el8 BUILT: Fri Feb 22 04:47:54 CST 2019 device-mapper-libs-1.02.155-6.el8 BUILT: Fri Feb 22 04:47:54 CST 2019 device-mapper-event-1.02.155-6.el8 BUILT: Fri Feb 22 04:47:54 CST 2019 device-mapper-event-libs-1.02.155-6.el8 BUILT: Fri Feb 22 04:47:54 CST 2019 device-mapper-persistent-data-0.7.6-1.el8 BUILT: Sun Aug 12 04:21:55 CDT 2018 # LV PV create attempt [root@hayes-02 lvm]# pvcreate -y --config devices/scan_lvs=0 /dev/snapper_thinp/snap_level1 Device /dev/snapper_thinp/snap_level1 excluded by a filter. [root@hayes-02 lvm]# pvcreate -y --config devices/scan_lvs=1 /dev/snapper_thinp/snap_level1 Physical volume "/dev/snapper_thinp/snap_level1" successfully created. # LV VG create attempt [root@hayes-02 lvm]# vgcreate STACK /dev/snapper_thinp/snap_level1 Device /dev/snapper_thinp/snap_level1 excluded by a filter. [root@hayes-02 lvm]# vgcreate STACK --config devices/scan_lvs=1 /dev/snapper_thinp/snap_level1 Volume group "STACK" successfully created # LV stacked on LV create attempt [root@hayes-02 lvm]# lvcreate -L 100m STACK Volume group "STACK" not found Cannot process volume group STACK [root@hayes-02 lvm]# lvcreate --config devices/scan_lvs=1 -L 100m STACK Logical volume "lvol0" created. # lvs display [root@hayes-02 lvm]# lvs -a -o +devices LV VG Attr LSize Pool Origin Data% Meta% Devices POOL snapper_thinp twi-aotz-- 1.00g 0.02 11.62 POOL_tdata(0) [POOL_tdata] snapper_thinp Twi-ao---- 1.00g /dev/sdl1(1) [POOL_tmeta] snapper_thinp ewi-ao---- 4.00m /dev/sdn1(0) [lvol0_pmspare] snapper_thinp ewi------- 4.00m /dev/sdl1(0) origin snapper_thinp Vwi-a-tz-- 1.00g POOL 0.00 snap_level1 snapper_thinp Vwi-aotz-- 1.00g POOL origin 0.02 [root@hayes-02 lvm]# lvs --config devices/scan_lvs=1 -a -o +devices LV VG Attr LSize Pool Origin Data% Meta% Devices lvol0 STACK -wi-a----- 100.00m /dev/snapper_thinp/snap_level1(0) POOL snapper_thinp twi-aotz-- 1.00g 0.02 11.62 POOL_tdata(0) [POOL_tdata] snapper_thinp Twi-ao---- 1.00g /dev/sdl1(1) [POOL_tmeta] snapper_thinp ewi-ao---- 4.00m /dev/sdn1(0) [lvol0_pmspare] snapper_thinp ewi------- 4.00m /dev/sdl1(0) origin snapper_thinp Vwi-a-tz-- 1.00g POOL 0.00 snap_level1 snapper_thinp Vwi-aotz-- 1.00g POOL origin 0.02 # vgs display [root@hayes-02 lvm]# vgs VG #PV #LV #SN Attr VSize VFree snapper_thinp 5 8 0 wz--n- 2.18t <2.18t [root@hayes-02 lvm]# vgs --config devices/scan_lvs=1 VG #PV #LV #SN Attr VSize VFree STACK 1 1 0 wz--n- 1020.00m 920.00m snapper_thinp 5 8 0 wz--n- 2.18t <2.18t