dracut: fix activationskip check in the lvm module.
Patch taken from http://permalink.gmane.org/gmane.linux.kernel.initramfs/4182 Close #2428
This commit is contained in:
parent
6fec8d363a
commit
55f6bb940e
2 changed files with 35 additions and 1 deletions
34
srcpkgs/dracut/patches/lvm-fix-activationskip-check.patch
Normal file
34
srcpkgs/dracut/patches/lvm-fix-activationskip-check.patch
Normal file
|
@ -0,0 +1,34 @@
|
|||
[PATCH] modules: lvm: fix activationskip check
|
||||
|
||||
Fix boot breakage due to the activationskip check introduced in
|
||||
cfa365a32d47 ("lvm: Don't activate LVs with activationskip set").
|
||||
|
||||
In 'man 8 lvs', it is stated that LVs with activationskip set, will have
|
||||
a "k" flag in their lvs attribute listing.
|
||||
|
||||
The current implementation excludes LVs which do not have the "k"
|
||||
flag set. This leads to the activation of LVs with the activationskip
|
||||
set and the exclusion of LVs with no activationskip set: the check's
|
||||
logic is inverted.
|
||||
|
||||
Fix this issue by skipping those LVs that have the "k" flag in their
|
||||
attributes.
|
||||
|
||||
Signed-off-by: Nicolai Stange <nicstange@...>
|
||||
---
|
||||
modules.d/90lvm/lvm_scan.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh
|
||||
index ce46e14..ba7d738 100755
|
||||
--- modules.d/90lvm/lvm_scan.sh
|
||||
+++ modules.d/90lvm/lvm_scan.sh
|
||||
<at> <at> -106,7 +106,7 <at> <at> if [ -n "$LVS" ] ; then
|
||||
info "Scanning devices $lvmdevs for LVM logical volumes $LVS"
|
||||
lvm lvscan --ignorelockingfailure 2>&1 | vinfo
|
||||
for LV in $LVS; do
|
||||
- if [ "x$(lvm lvs --noheadings --select "lv_attr =~ k" $LV | wc -l)" = "x0" ]; then
|
||||
+ if [ "x$(lvm lvs --noheadings --select "lv_attr =~ k" $LV | wc -l)" != "x0" ]; then
|
||||
info "Skipping activation of '$LV' because activationskip is set."
|
||||
continue
|
||||
fi
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'dracut'
|
||||
pkgname=dracut
|
||||
version=043
|
||||
revision=6
|
||||
revision=7
|
||||
build_style=configure
|
||||
configure_args="--prefix=/usr --sysconfdir=/etc"
|
||||
hostmakedepends="libxslt docbook-xsl asciidoc"
|
||||
|
|
Loading…
Reference in a new issue