Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionRichard W.M. Jones
2019-07-05 10:11:06 UTC
Description of problem:
See also:
https://bugzilla.redhat.com/show_bug.cgi?id=1723275#c6
LVM2 has added a new check in pvscan:
pvscan[192] PV /dev/sda ignore for size 204800 not matching device 2097152.
This breaks virt-resize which resizes the underlying disk
before calling pvresize to resize the device.
Please remove this check, it's wrong.
Version-Release number of selected component (if applicable):
lvm2 2.03.05-1.el8
How reproducible:
100%
Steps to Reproduce:
There is a reproducer here:
https://bugzilla.redhat.com/show_bug.cgi?id=1723275#c6
Comment 1Richard W.M. Jones
2019-07-05 10:11:39 UTC
Upstream commit was:
commit 7836e7aa1c17216ed368fda89cfc805a07efda81
Author: David Teigland <teigland>
Date: Fri Apr 5 16:44:00 2019 -0500
pvscan: ignore device with incorrect size
If a device looks like a PV, but its size does not
match the PV size in the metadata, then skip it for
purposes of autoactivation. It's probably not wrong
device for the PV.
I understand that we allow the device to be larger than the PV (for the obvious case of pvresize), but I did not believe that autoactivation needed to worry about this case. I guess you have found a case where autoactivation does need to worry about it. The check was another attempt to exclude md component devices with superblocks at the end of the devices, but I'll have to rework that check.
Incidentally, even with this fixed, cases like this are probably better off using direct activation instead of event based activation (set event_activation=0 in lvm.conf).
PV size may not match size of device at any time - it's not related to autoactivation.
User can set explicitly the size of used portion of device with 'pvcreate --setphysicalvolumesize'.
So if we have put any filtering rule based on PV matching device size - this limitation needs to be restored back.
i.e. user can resize up/down partition table anytime later on - lvm2 only uses the size specified in PV header.
My workstation fails to boot since filesystems from fstab can not be found due to not activated volumes,
which used to work before (so restriction in current form causing regression).
It drops into maintenance mode and can be booted only after explicit 'vgchange -a y'.
(users probably wouldn't be very happy after update)
These two commits fix the problem:
https://sourceware.org/git/?p=lvm2.git;a=commit;h=f17353e3e604ad2d80bcd77ea0a6a93472e6b5bd
md component detection for differing PV and device sizes
This check was mistakenly removed when shifting code in commit
"separate code for setting devices from metadata parsing".
Put it back with some new conditions.
https://sourceware.org/git/?p=lvm2.git;a=commit;h=b16abb3816408a296343a75658d4be0ef688390b
pvscan: fix PV online when device has a different size
Fix commit 7836e7aa1c17216ed368fda89cfc805a07efda81
"pvscan: ignore device with incorrect size"
which caused pvscan to not consider a PV online (for purposes
of event based activation) if the PV and device sizes differed.
This helped to avoid mistaking MD components for PVs, and is
replaced by triggering an md component check when PV and device
sizes differ (which happens in set_pv_device).
How to reproduce this? QE will need a better reproducer than using virt-resize IMO.
I have a VM with PVs which do not match the size of underlying device and it boots fine and the LV is activated. I tried both PV on /dev/sda and with a partitioned device.
What am I missing?
Comment 8Richard W.M. Jones
2019-07-12 09:28:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2019:3654