dracut: merge d4b93a092db from upstream git.

This removes the logic to skip activation of LVs with the activationskip
'k' flag which is unnecessary with recent lvm2 versions.

Remove the other patches because they were obsolete and wrong, thanks
to al3hex for the notice.
This commit is contained in:
Juan RP 2015-09-02 08:12:45 +02:00
parent 553ae62f17
commit 673ce1e962
4 changed files with 29 additions and 45 deletions

View File

@ -0,0 +1,28 @@
commit d4b93a092db1105a29a3f768d1d49ece8b90547a
Author: Fabian Deutsch <fabiand@fedoraproject.org>
Date: Thu Jun 25 11:17:59 2015 +0200
Revert "lvm: Don't activate LVs with activationskip set"
This reverts commit cfa365a32d47388c8476064b23d7d4684f1e591b.
The logic in commit cfa365a was added to prevent (odl) lvms from
activating snapshots which should not be activated.
Newer lvms however do this automatically (not enabling an LV if the
the 'k' attribute set), thus we can revert the previous commit.
diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh
index ce46e14..7495644 100755
--- modules.d/90lvm/lvm_scan.sh
+++ modules.d/90lvm/lvm_scan.sh
@@ -106,10 +106,6 @@ 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
- info "Skipping activation of '$LV' because activationskip is set."
- continue
- fi
if [ -z "$sysinit" ]; then
lvm lvchange --yes -ay --ignorelockingfailure $nopoll --ignoremonitoring $LV 2>&1 | vinfo
else

View File

@ -1,34 +0,0 @@
[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

View File

@ -1,10 +0,0 @@
--- modules.d/90lvm/module-setup.sh.orig 2015-08-20 16:39:33.989335973 +0200
+++ modules.d/90lvm/module-setup.sh 2015-08-20 16:39:48.163501858 +0200
@@ -117,6 +117,7 @@ install() {
inst_script "$moddir/lvm_scan.sh" /sbin/lvm_scan
inst_hook cmdline 30 "$moddir/parse-lvm.sh"
+ inst_binary wc
inst_libdir_file "libdevmapper-event-lvm*.so"
if [[ $hostonly ]] && type -P lvs &>/dev/null; then

View File

@ -1,7 +1,7 @@
# Template file for 'dracut'
pkgname=dracut
version=043
revision=7
revision=8
build_style=configure
configure_args="--prefix=/usr --sysconfdir=/etc"
hostmakedepends="libxslt docbook-xsl asciidoc"