|
Harald Hoyer |
ab65ae |
From b8a81fb885c981d795a664ae8665e68d7359231a Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
ab65ae |
From: Peter Rajnoha <prajnoha@redhat.com>
|
|
Harald Hoyer |
ab65ae |
Date: Tue, 10 Apr 2012 04:40:53 -0400
|
|
Harald Hoyer |
ab65ae |
Subject: [PATCH] lvm: disable lvmetad
|
|
Harald Hoyer |
ab65ae |
|
|
Harald Hoyer |
ab65ae |
Currently dracut uses lvm.conf as found in the system and modifies only
|
|
Harald Hoyer |
ab65ae |
global/locking_type setting. As there's a new feature introduced - the lvmetad
|
|
Harald Hoyer |
ab65ae |
daemon, dracut should disable its use as well by setting "global/use_lvmetad=0"
|
|
Harald Hoyer |
ab65ae |
(patch attached).
|
|
Harald Hoyer |
ab65ae |
|
|
Harald Hoyer |
ab65ae |
Otherwise, there's a warning message issued:
|
|
Harald Hoyer |
ab65ae |
|
|
Harald Hoyer |
ab65ae |
dracut: WARNING: Failed to connect to lvmetad: No such file or directory.
|
|
Harald Hoyer |
ab65ae |
Falling back to internal scanning.
|
|
Harald Hoyer |
ab65ae |
|
|
Harald Hoyer |
ab65ae |
@@ -, +, @@
|
|
Harald Hoyer |
ab65ae |
modules.d/90lvm/lvm_scan.sh | 2 ++
|
|
Harald Hoyer |
ab65ae |
modules.d/90lvm/module-setup.sh | 1 +
|
|
Harald Hoyer |
ab65ae |
2 files changed, 3 insertions(+), 0 deletions(-)
|
|
Harald Hoyer |
ab65ae |
---
|
|
Harald Hoyer |
ab65ae |
modules.d/90lvm/lvm_scan.sh | 2 ++
|
|
Harald Hoyer |
ab65ae |
modules.d/90lvm/module-setup.sh | 1 +
|
|
Harald Hoyer |
ab65ae |
2 files changed, 3 insertions(+)
|
|
Harald Hoyer |
ab65ae |
|
|
Harald Hoyer |
ab65ae |
diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh
|
|
Harald Hoyer |
ab65ae |
index 104565f..17c29bc 100755
|
|
Harald Hoyer |
ab65ae |
--- a/modules.d/90lvm/lvm_scan.sh
|
|
Harald Hoyer |
ab65ae |
+++ b/modules.d/90lvm/lvm_scan.sh
|
|
Harald Hoyer |
ab65ae |
@@ -35,10 +35,12 @@ if [ ! -e /etc/lvm/lvm.conf ]; then
|
|
Harald Hoyer |
ab65ae |
if [ -n $SNAPSHOT ]; then
|
|
Harald Hoyer |
ab65ae |
echo 'global {';
|
|
Harald Hoyer |
ab65ae |
echo ' locking_type = 1';
|
|
Harald Hoyer |
ab65ae |
+ echo ' use_lvmetad = 0';
|
|
Harald Hoyer |
ab65ae |
echo '}';
|
|
Harald Hoyer |
ab65ae |
else
|
|
Harald Hoyer |
ab65ae |
echo 'global {';
|
|
Harald Hoyer |
ab65ae |
echo ' locking_type = 4';
|
|
Harald Hoyer |
ab65ae |
+ echo ' use_lvmetad = 0';
|
|
Harald Hoyer |
ab65ae |
echo '}';
|
|
Harald Hoyer |
ab65ae |
fi
|
|
Harald Hoyer |
ab65ae |
} > /etc/lvm/lvm.conf
|
|
Harald Hoyer |
ab65ae |
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
|
|
Harald Hoyer |
ab65ae |
index 15c824d..2ce5c50 100755
|
|
Harald Hoyer |
ab65ae |
--- a/modules.d/90lvm/module-setup.sh
|
|
Harald Hoyer |
ab65ae |
+++ b/modules.d/90lvm/module-setup.sh
|
|
Harald Hoyer |
ab65ae |
@@ -49,6 +49,7 @@ install() {
|
|
Harald Hoyer |
ab65ae |
# FIXME: near-term hack to establish read-only locking;
|
|
Harald Hoyer |
ab65ae |
# use command-line lvm.conf editor once it is available
|
|
Harald Hoyer |
ab65ae |
sed -i -e 's/\(^[[:space:]]*\)locking_type[[:space:]]*=[[:space:]]*[[:digit:]]/\1locking_type = 4/' ${initdir}/etc/lvm/lvm.conf
|
|
Harald Hoyer |
ab65ae |
+ sed -i -e 's/\(^[[:space:]]*\)use_lvmetad[[:space:]]*=[[:space:]]*[[:digit:]]/\1use_lvmetad = 0/' ${initdir}/etc/lvm/lvm.conf
|
|
Harald Hoyer |
ab65ae |
fi
|
|
Harald Hoyer |
ab65ae |
fi
|
|
Harald Hoyer |
ab65ae |
|