-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip LVM filesystem check on LV reduction #417
Conversation
Reviewed-by: Jean-Louis Dupond [email protected] Quite an important one. As if the lvreduce fails, the snapshot disk becomes ILLEGAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. LGTM in general. Could you try to add a test (lvm_test.py
) checking the new cli option is added or not depending on the version? Maybe with mocked _get_lvm_version
.
Also, worth checking that lvm
appears at osinfo_test.py
.
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 |
I am not quite sure what you mean. I've added an extra assert to the |
/ost |
No changes, just squashed my commits together. |
/ost |
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]>
65d70e4
to
98d7f32
Compare
Merging based on previous review and approval |
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 oVirt already handles checksize, making lvreduce redundant.