Skip to content

Commit

Permalink
storage: add --fs ignore to lvreduce on lvm > 2.03.17
Browse files Browse the repository at this point in the history
Since LVM v2.03.17 (lvmteam/lvm2@f6f2737), 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 the oVirt already handles checksize, making lvreduce redundant.

Signed-off-by: Brooklyn Dewolf <[email protected]>
  • Loading branch information
BrooklynDewolf committed May 23, 2024
1 parent 43b1958 commit ad7963a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/lib/osinfo_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def test_kernel_args(test_input, expected_result):
def test_package_versions():
pkgs = osinfo.package_versions()
assert 'kernel' in pkgs
assert 'lvm2' in pkgs


def test_get_boot_uuid(fake_findmnt):
Expand Down

0 comments on commit ad7963a

Please sign in to comment.