Bug 2188830 - lvm resize in anaconda fails with lvm 2.03.21: "The LV must be active to safely reduce"
Summary: lvm resize in anaconda fails with lvm 2.03.21: "The LV must be active to safe...
Alias: None
Product: Fedora
Classification: Fedora
Component: libblockdev
Version: rawhide
Hardware: Unspecified
OS: Linux
Target Milestone: ---
Assignee: Vojtech Trefny
QA Contact: Fedora Extras Quality Assurance
Whiteboard: openqa
Depends On:
TreeView+ depends on / blocked
Reported: 2023-04-22 17:58 UTC by Adam Williamson
Modified: 2023-05-19 15:16 UTC (History)
15 users (show)

Fixed In Version: libblockdev-2.28-6.fc39
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2023-05-19 13:04:24 UTC
Type: ---

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github storaged-project libblockdev pull 888 0 None open Allow resizing of inactive LVs with latest LVM 2023-05-17 17:45:50 UTC

Description Adam Williamson 2023-04-22 17:58:35 UTC
In today's Rawhide, openQA's installer LVM resize test failed: https://openqa.fedoraproject.org/tests/1904073 . anaconda is failing on an error in lvm:

pyanaconda.modules.common.errors.general.AnacondaError: Failed to call the 'Resize' method on the '/com/redhat/lvmdbus1/Lv/0' object: GDBus.Error:org.freedesktop.DBus.Python.dbus.exceptions.DBusException: ('com.redhat.lvmdbus1.Lv', 'Exit code 5, stderr = The LV must be active to safely reduce (see --fs options.)')

Reproducible: Always

Steps to Reproduce:
1.Using Fedora-Rawhide-20230422.n.0, attempt an install during which an existing LVM LV is reduced in size to make space for the new installation.
Actual Results:  
The installer crashes early in the install process with a dialog "An unknown error has occurred". anaconda.log shows the error above.

Expected Results:  
The install should succeed.

lvm2 went from lvm2-2.03.20-3.fc39 to lvm2-2.03.21-1.fc39 in the affected compose. The constraint itself is not new in 2.03.21, I checked - it was already present in 2.03.20. So presumably some other change in 2.03.21 causes the constraint to be hit (the LV to be considered not "active") when before it was not.

Comment 1 Adam Williamson 2023-04-22 17:59:41 UTC
CCing vtrefny for the anaconda/blivet side of this.

Comment 2 Vojtech Trefny 2023-04-24 05:43:09 UTC
This is a new feature in LVM -- inactive LVs cannot be resized to prevent people accidentally shrinking inactive LVs with XFS and destroying their data in the process. This is not an issue in the installer, blivet takes care of resizing the filesystem first when needed/applicable. We have a fix for this in upstream, I need to backport it to Fedora. I am not sure why this didn't show in openQA before, the feature should be present in LVM 2.03.19 which was build in rawhide 2 months ago.

Comment 3 Adam Williamson 2023-05-16 22:59:11 UTC
Any news on that backport? This is still failing every day.

Comment 4 Vojtech Trefny 2023-05-17 18:29:07 UTC
I am sorry, I completely forgot about this. I built a new version of libblockdev for rawhide with the patch included, hopefully it will fix this issue.

Comment 5 Vojtech Trefny 2023-05-19 13:04:24 UTC
The 'install_resize_lvm' job passed with the latest rawhide build[1] so I am closign this as fixed. Sorry again for taking that long.

[1] https://openqa.fedoraproject.org/tests/1944370

Comment 6 Adam Williamson 2023-05-19 15:16:48 UTC
Yeah, I think we're good, thanks. The blivet test is actually a better reproducer - the regular custom partitioning one only failed *sometimes* on this, for some reason, the blivet one seemed to fail every time. But both passed today, so looks good. thanks!

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