From: Fabian Deutsch Date: Thu, 21 May 2015 10:38:05 +0000 (+0200) Subject: lvm: Don't activate LVs with activationskip set X-Git-Tag: 042~25^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F64%2Fhead;p=thirdparty%2Fdracut.git lvm: Don't activate LVs with activationskip set Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1186854 Signed-off-by: Fabian Deutsch --- diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh index 749564408..ce46e1455 100755 --- a/modules.d/90lvm/lvm_scan.sh +++ b/modules.d/90lvm/lvm_scan.sh @@ -106,6 +106,10 @@ 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