You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
2.6 KiB
72 lines
2.6 KiB
2 years ago
|
From 441c2c211d3c0fd8003ebb7622f44f360e75cbcd Mon Sep 17 00:00:00 2001
|
||
|
From: David Teigland <teigland@redhat.com>
|
||
|
Date: Wed, 8 Dec 2021 14:07:42 -0600
|
||
|
Subject: [PATCH] revert(lvm): remove lvmetad config changes
|
||
|
|
||
|
Remove support for modifying use_lvmetad and locking_type
|
||
|
settings in lvm.conf for lvm versions 2.2.*. Recent lvm
|
||
|
versions (2.3.*) do not include lvmetad or locking_type.
|
||
|
This cleanup simplifies code maintenance.
|
||
|
|
||
|
To use the lvm module with older versions (2.2), a user
|
||
|
would need to ensure that lvmetad settings are disabled
|
||
|
in the initrd's lvm.conf rather than relying on the lvm
|
||
|
dracut mode to modify their lvm.conf.
|
||
|
|
||
|
(cherry picked from commit f6f393f550625e3e1c968ef32d6d7bdd90f51d73)
|
||
|
|
||
|
Resolves: #2037955
|
||
|
---
|
||
|
modules.d/90lvm/lvm_scan.sh | 3 ---
|
||
|
modules.d/90lvm/module-setup.sh | 14 --------------
|
||
|
2 files changed, 17 deletions(-)
|
||
|
|
||
|
diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh
|
||
|
index 43601ad1..80382407 100755
|
||
|
--- a/modules.d/90lvm/lvm_scan.sh
|
||
|
+++ b/modules.d/90lvm/lvm_scan.sh
|
||
|
@@ -28,10 +28,7 @@ if [ ! -e /etc/lvm/lvm.conf ]; then
|
||
|
echo '"r/.*/" ]'
|
||
|
echo '}'
|
||
|
|
||
|
- # establish LVM locking
|
||
|
echo 'global {'
|
||
|
- echo ' locking_type = 4'
|
||
|
- echo ' use_lvmetad = 0'
|
||
|
echo '}'
|
||
|
} > /etc/lvm/lvm.conf
|
||
|
lvmwritten=1
|
||
|
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
|
||
|
index e1e6c582..0bb491f3 100755
|
||
|
--- a/modules.d/90lvm/module-setup.sh
|
||
|
+++ b/modules.d/90lvm/module-setup.sh
|
||
|
@@ -61,10 +61,6 @@ install() {
|
||
|
if [[ $hostonly ]] || [[ $lvmconf == "yes" ]]; then
|
||
|
if [[ -f $dracutsysrootdir/etc/lvm/lvm.conf ]]; then
|
||
|
inst_simple -H /etc/lvm/lvm.conf
|
||
|
- # FIXME: near-term hack to establish read-only locking;
|
||
|
- # use command-line lvm.conf editor once it is available
|
||
|
- sed -i -e 's/\(^[[:space:]]*\)locking_type[[:space:]]*=[[:space:]]*[[:digit:]]/\1locking_type = 4/' "${initdir}/etc/lvm/lvm.conf"
|
||
|
- sed -i -e 's/\(^[[:space:]]*\)use_lvmetad[[:space:]]*=[[:space:]]*[[:digit:]]/\1use_lvmetad = 0/' "${initdir}/etc/lvm/lvm.conf"
|
||
|
fi
|
||
|
|
||
|
export LVM_SUPPRESS_FD_WARNINGS=1
|
||
|
@@ -82,16 +78,6 @@ install() {
|
||
|
unset LVM_SUPPRESS_FD_WARNINGS
|
||
|
fi
|
||
|
|
||
|
- if ! [[ -e ${initdir}/etc/lvm/lvm.conf ]]; then
|
||
|
- mkdir -p "${initdir}/etc/lvm"
|
||
|
- {
|
||
|
- echo 'global {'
|
||
|
- echo 'locking_type = 4'
|
||
|
- echo 'use_lvmetad = 0'
|
||
|
- echo '}'
|
||
|
- } > "${initdir}/etc/lvm/lvm.conf"
|
||
|
- fi
|
||
|
-
|
||
|
inst_rules 11-dm-lvm.rules 69-dm-lvm-metad.rules
|
||
|
|
||
|
# Do not run lvmetad update via pvscan in udev rule - lvmetad is not running yet in dracut!
|
||
|
|