-
Notifications
You must be signed in to change notification settings - Fork 74
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
harv-install: deactivate LVM in spite of global_filter #711
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
harvester/os2#86 adds a global_filter to /etc/lvm/lvm.conf to avoid activing LVM on the host. Unfortunately, dracut-initqueue runs _very_ early in the boot process (before any of the elemental stages are run), so this filter isn't taken into account on boot, and LVM volumes are still potentially activated. Later, when we try to run `blkdeactivate` in `harv-install`, it doesn't work, because the filter _is_ active then, so it skips deactivation and then the subsequent disk repartitioning fails. We can work around this by setting up a temporary lvm config which has that global_filter stripped out. Related issue: harvester/harvester#5398 Signed-off-by: Tim Serong <tserong@suse.com>
bk201
approved these changes
Apr 19, 2024
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.
lgmt, thanks!
Vicente-Cheng
approved these changes
Apr 19, 2024
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.
nice catch! Thanks!
@Mergifyio backport v1.2 |
✅ Backports have been created
|
@Mergifyio backport v1.3 |
✅ Backports have been created
|
This was referenced Apr 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem:
harvester/os2#86 adds a global_filter to /etc/lvm/lvm.conf to avoid activing LVM on the host. Unfortunately, dracut-initqueue runs very early in the boot process (before any of the elemental stages are run), so this filter isn't taken into account on boot, and LVM volumes are still potentially activated. Later, when we try to run
blkdeactivate
inharv-install
, it doesn't work, because the filter is active then, so it skips deactivation and then the subsequent disk repartitioning fails.Solution:
We can work around this by setting up a temporary lvm config which has that global_filter stripped out.
Related Issue:
harvester/harvester#5398
Test plan:
Note: this requires real hardware (I couldn't reproduce the problem running the installer in a VM):
pvcreate
,vgcreate
andlvcreate
to create a volume or volumes on the disk you plan to install on.