Closed BrooklynDewolf closed 2 months ago
Reviewed-by: Jean-Louis Dupond jean-louis@dupond.be
Quite an important one. As if the lvreduce fails, the snapshot disk becomes ILLEGAL. This only affects el9 hosts btw, as el8 has older lvm version without this --fs option.
Thank you for you feedback. I have added a parameterized test that tests the reduce function with different LVM versions which runs without any problems!
Great, can you please check for lvm
at osinfo_test.py
too?
I am not quite sure what you mean. I've added an extra assert to the test_package_versions()
function.
/ost
No changes, just squashed my commits together.
/ost
Merging based on previous review and approval
Since LVM v2.03.17 (https://github.com/lvmteam/lvm2/commit/f6f2737015746b1b6c7fbd0d297a4596c584749b), reducing a logical volume (LV) requires the LV to be active due to the default 'checksize' option, which requires an active LV. This results in the following error when attempting to reduce a non-active LV:
err=[\' The LV must be active to safely reduce (see --fs options.)\']' ----
To resolve this, we now check if the LVM version is newer than 2.03.17. If so, we bypass the 'checksize' by using the '--fs ignore' option. This approach is viable because oVirt already handles checksize, making lvreduce redundant.