]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
lvm: Don't activate LVs with activationskip set 64/head
authorFabian Deutsch <fabiand@fedoraproject.org>
Thu, 21 May 2015 10:38:05 +0000 (12:38 +0200)
committerFabian Deutsch <fabiand@fedoraproject.org>
Thu, 21 May 2015 10:38:05 +0000 (12:38 +0200)
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1186854
Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
modules.d/90lvm/lvm_scan.sh

index 749564408c0b7d36191f557450ca364df45d55a9..ce46e14554de1b78ded65dd625a1ae93a3378ee5 100755 (executable)
@@ -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