Hide Forgot
Created attachment 1212992 [details] lvm debug logs showing a normal pvs output followed by the problem seen
Can we see the content of 1MB of /dev/vdb ? cache/lvmcache.c:1513 lvmcache: /dev/vdb: now in VG #orphans_lvm2 (#orphans_lvm2) with 0 mdas format_text/text_label.c:422 /dev/vdb: PV header extension version 1 found format_text/format-text.c:1176 /dev/vdb: found metadata with offset 0. device/dev-io.c:614 Closed /dev/vdb device/dev-io.c:559 Opened /dev/vdc RO O_DIRECT Doesn't look correct. Is there ANYONE else updating metadata in parallel without locking ? Is disk shared with someone else ? i.e. host and guest both see the device ?
Yep 'before' has seqno 22 and PV V83deV-l32G-dZ1u-viO3-PeL3-Chmz-q290Fh was located on /dev/vdc with 479 extents 'after' has 2 more seqno 23 & 24: version 23 for UUID V83deV-l32G-dZ1u-viO3-PeL3-Chmz-q290Fh is now on /dev/vdb with 959 extents as well as version 24 and likely there was unprotected access - so pointer to metadata sector has been cleared along the way. So is the user trying to do some LIVE resize on Host machine with some 'vision' of having new space available in Guest ? (surely this will not work this way)
Adding LVM filters on the Host makes the problem go away. The filters are the same as we proposed on BZ #1374545. Zdenek, do you think this could be some other effect of that BZ, but on RHEL6 - this time LVs are not activated, but the Host is "seeing them", what apparently triggers this behavior. When they are hidden, the problem goes away.
Setting correct filter and avoiding parallel UNPROTECTED access to lvm2 metadata is mandatory condition for proper lvm2 usage. lvm2 simply can't work reliable when different commands are changing SAME disk space at the same time. This is responsibility of system administrator to properly configure the system for this.
Thanks Zdenek, opened BZ #1411197 to track this from RHV side.
This turned out to be a RHV problem. With proper LVM filtering in the Hypervisor this doesn't happen. There are several BZs in RHV handling this, I don't think there is anything to be done on RHEL or lvm, therefore closing the bug.