Skip to content
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

Disable LVM auto-activation during installation #6234

Open
wants to merge 2 commits into
base: fedora-42
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions anaconda.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ def exitHandler(rebootData):
task_proxy = STORAGE.get_proxy(task_path)
sync_run_task(task_proxy)

# reenable LVM auto-activation disabled in enable_installer_mode
from blivet.devicelibs import lvm
try:
lvm.reenable_lvm_autoactivation()
except RuntimeError as e:
log.error("Failed to reenable LVM auto-activation: %s", str(e))

# Stop the DBus session.
anaconda.dbus_launcher.stop()

Expand Down
2 changes: 1 addition & 1 deletion anaconda.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Source0: https://github.com/rhinstaller/%{name}/releases/download/%{name}-%{vers
%define nmver 1.0
%define pykickstartver 3.61-1
%define pypartedver 2.5-2
%define pythonblivetver 1:3.9.0-1
%define pythonblivetver 1:3.12.0-1
%define rpmver 4.15.0
%define simplelinever 1.9.0-1
%define subscriptionmanagerver 1.29.31
Expand Down
9 changes: 8 additions & 1 deletion pyanaconda/modules/storage/initialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
from blivet import arch, blockdev, udev
from blivet import util as blivet_util
from blivet.devicelibs import crypto
from blivet.devicelibs import crypto, lvm
from blivet.flags import flags as blivet_flags
from blivet.formats import get_device_format_class
from blivet.static_data import luks_data
Expand Down Expand Up @@ -81,6 +81,13 @@ def enable_installer_mode():
# We need this so all the /dev/disk/* stuff is set up.
udev.trigger(subsystem="block", action="change")

# Disable LVM auto-activation during installation
if not conf.target.is_directory and not conf.target.is_image:
try:
lvm.disable_lvm_autoactivation()
except RuntimeError as e:
log.error("Failed to disable LVM auto-activation: %s", str(e))


def _set_default_label_type():
"""Set up the default label type."""
Expand Down
Loading