Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1825147

Summary: Creation of thin-clone LUNs leads to lvm problems on the hypervisor
Product: [oVirt] ovirt-engine Reporter: Siegfried Reinwald <siegfried.reinwald>
Component: BLL.StorageAssignee: Tal Nisan <tnisan>
Status: CLOSED NOTABUG QA Contact: Avihai <aefrat>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.3.8.2CC: bugs, vjuranek
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-19 08:55:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Siegfried Reinwald 2020-04-17 07:58:49 UTC
Description of problem:
We've created 5 LUNs on our storage and attached them to a virtual machine in ovirt. Then we created a vg spanning the 5 LUNs on that virtual machine.
Afterwards we created thin-clones of theses luns on our storage and attached them to a different virtual machine in ovirt. This works fine, except the hypervisor also tries to assemble this vg and fails.

Obviously the hypervisor sees all 10 LUNs (the original LUNs as well as their thin clones) and fails when assembling the vg. The ouput of vgs looks like this:

Scan of VG vg_de1_mmc from /dev/mapper/36006016008624f00068a955e6d6575ba found metadata seqno 4 vs previous 2.
  WARNING: Not using device /dev/mapper/36006016008624f00d28d955e048d68cf for PV kf0spu-JQGZ-Y6F8-0ae0-ht8c-He5r-nzeJHA.
  WARNING: Not using device /dev/mapper/36006016008624f0088d37c5e98d19cdc for PV WINHpr-VUsi-vapi-0u5v-xi92-Y1ZS-elCP2e.
  WARNING: Not using device /dev/mapper/36006016008624f0088d37c5e86469d7e for PV SVXXJP-CAWX-NfPa-ASkL-wiIT-E37H-9el4aX.
  WARNING: Not using device /dev/mapper/36006016008624f0088d37c5edf5bb0ca for PV b79Sw6-SE17-ZsHN-Gew3-KZHy-Yteq-0GfKKj.
  WARNING: Not using device /dev/mapper/36006016008624f0088d37c5e5b7fbb86 for PV bjM7ex-PRR2-o200-Y8T0-w0e1-QE1k-GCUv9u.
  WARNING: PV kf0spu-JQGZ-Y6F8-0ae0-ht8c-He5r-nzeJHA prefers device /dev/mapper/36006016008624f00068a955e6d6575ba because device was seen first.
  WARNING: PV WINHpr-VUsi-vapi-0u5v-xi92-Y1ZS-elCP2e prefers device /dev/mapper/36006016008624f00bd69845e0c534467 because device was seen first.
  WARNING: PV SVXXJP-CAWX-NfPa-ASkL-wiIT-E37H-9el4aX prefers device /dev/mapper/36006016008624f007f6a845e42e81dc7 because device was seen first.
  WARNING: PV b79Sw6-SE17-ZsHN-Gew3-KZHy-Yteq-0GfKKj prefers device /dev/mapper/36006016008624f00489a845e8fb1a55e because device was seen first.
  WARNING: PV bjM7ex-PRR2-o200-Y8T0-w0e1-QE1k-GCUv9u prefers device /dev/mapper/36006016008624f00fe69845e8163fa9f because device was seen first.
  Scan of VG vg_de1_mmc from /dev/mapper/36006016008624f00068a955e6d6575ba found metadata seqno 4 vs previous 2.
  Scan of VG vg_de1_mmc from /dev/mapper/36006016008624f00068a955e6d6575ba found metadata seqno 4 vs previous 2.
  Recovery of volume group "vg_de1_mmc" failed.
  Cannot process volume group vg_de1_mmc

Which subsequently leads to the login script failing.


Version-Release number of selected component (if applicable):
ovirt 4.8.3.2

How reproducible:
Every Time

Steps to Reproduce:
1. Create 5 LUNs on your storage and attach them via direct-lun to a virtual machine in ovirt
2. Create a vg spanning all 5 LUNs on the virtual machine
3. Create Thin-Clones of these 5 LUNs on your storage
4. Attach these 5 Thin-clones to another virtual machine via direct-lun in ovirt

Actual results:
It works on the virtual machines, but the hypervisor tries to assemble the vg and fails because it sees duplicate pvs


Expected results:
Hypervisor is able to assemble the vg or at least ignores it, because it's handled by the virtual machine's lvm anyway. 


Additional info:
What we did now is blacklisting the LUNs in the lvm.conf of the hypervisor, which seems to work fine. Is this a valid solution to this problem or is there a better one?

br

Comment 1 Tal Nisan 2020-04-20 14:32:56 UTC
Seems like indeed LVM filter is the right solution for that as you are using cloned LUNs, Vojta what do you think?

Comment 2 RHEL Program Management 2020-04-20 14:33:03 UTC
The documentation text flag should only be set after 'doc text' field is provided. Please provide the documentation text and set the flag to '?' again.

Comment 3 Vojtech Juranek 2020-05-18 23:14:23 UTC
(In reply to Tal Nisan from comment #1)
> Seems like indeed LVM filter is the right solution for that as you are using
> cloned LUNs, Vojta what do you think?

yes, you should configure LVM filter, host shouldn't scan anything besides volumes it needs. You can run

    vdsm-tool config-lvm-filter

on the host and vdsm will generate correct filter for you. See 
https://blogs.ovirt.org/2017/12/lvm-configuration-the-easy-way/
for more details about this tool.

Comment 4 Tal Nisan 2020-05-19 08:55:12 UTC
Siegfried, see comment #3, this should solve your issue.
Closing the bug, if you encounter any other issue please reopen

Comment 5 Siegfried Reinwald 2020-05-28 07:52:27 UTC
ok. thanks