Bug 1488378 - unable to scan lvm2 partitions that were thin provisioned under rhevm 4.1
Summary: unable to scan lvm2 partitions that were thin provisioned under rhevm 4.1
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: SmartState Analysis
Version: 5.8.0
Hardware: All
OS: All
unspecified
high
Target Milestone: GA
: 5.9.0
Assignee: Mo Morsi
QA Contact: Ilanit Stein
URL:
Whiteboard: rhev
Depends On:
Blocks: 1511147
TreeView+ depends on / blocked
 
Reported: 2017-09-05 09:00 UTC by Felix Dewaleyne
Modified: 2021-06-10 12:57 UTC (History)
13 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1511147 (view as bug list)
Environment:
Last Closed: 2018-03-06 14:54:06 UTC
Category: Bug
Cloudforms Team: RHEVM
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Felix Dewaleyne 2017-09-05 09:00:45 UTC
Description of problem:
unable to scan lvm2 partitions that were thin provisioned under rhevm 4.1

Version-Release number of selected component (if applicable):
cfme-5.8.1.5

How reproducible:
customer environment

Steps to Reproduce:
1. provision a vm against a satellite that would have 2 partitions; /dev/sda1 (boot) and /dev/sda2 (volume group). it must use thin provisioning.
2. smartscan the vm with an appliance inside the rhev environment
3.

Actual results:
 ERROR -- : Unable to mount filesystem.  Reason:[LVM2Thin cannot find device block: 1 (closest: 0)] for VM [/rhev/data-center/4a7e8c73-ca1b-489d-acb8-7e11cd64eb36/mastersd/master/vms/830b3ebd-b46d-4ea0-a78b-d22520987720/830b3ebd-b46d-4ea0-a78b-d22520987720.ovf]


Expected results:
able to mount and scan the filesystem

Additional info:
this issue doesn't happen for non-thin provisioning.

Comment 3 Felix Dewaleyne 2017-09-05 09:16:43 UTC
if I can I will try to get access to the .ovf file.

Comment 12 Mo Morsi 2017-09-19 22:27:30 UTC
I have verified the issue w/ the provided disk image and sent a PR w/ a tentative fix. Once that is verified and merged, we can begin the process of backporting it to the necessary branches.

https://github.com/ManageIQ/manageiq-smartstate/pull/28/commits/9e28a88e376a379909fdc505f0382770cf74c87d

Comment 15 Satoe Imaishi 2017-09-29 13:36:57 UTC
PR: https://github.com/ManageIQ/manageiq-smartstate/pull/28

https://github.com/ManageIQ/manageiq/pull/16028 bumps manageiq-smartstate gem to 0.1.5 which includes this fix.

Comment 17 Ilanit Stein 2018-02-05 15:51:03 UTC
Verified on CFME-5.9.0.19/RHV-4.1.8:

Created a VM with 1 disk with RHEL-7.4 OS, and a 2nd disk,
created by the bellow guidance, with RHV storage QE team help.
Smart state analysis for this VM ended up successfully.
Packages, users, files were collected successfully.

Mo's guidance for creating the 2nd image:
"create a raw disk image and then partition it and incorporate it into a LVM physical / logical volume structure.

https://superuser.com/questions/518554/how-do-you-create-and-partition-a-raw-disk-image

https://www.redhat.com/archives/linux-lvm/2008-June/msg00045.html

When setting up the volume, make sure it is allocated via 'thin provisioning'

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Logical_Volume_Manager_Administration/thinly_provisioned_volume_creation.html


You can then 'dd' a small amount of data onto the logical volume, but you _shouldn't_ format it with any filesystem as that will more certainly allocate more blocks than the original issue can be replicated with."


Note You need to log in before you can comment on or make changes to this bug.