]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
lvm:lvm_scan.sh handle one LV at a time with lvchange
authorHarald Hoyer <harald@redhat.com>
Fri, 24 Jan 2014 15:37:13 +0000 (16:37 +0100)
committerHarald Hoyer <harald@redhat.com>
Tue, 11 Mar 2014 11:16:14 +0000 (12:16 +0100)
modules.d/90lvm/lvm_scan.sh

index 85ecd4df154221e489147d4e76d5c62b4b77fa39..f87831c763c8975e36a39c5f76e32b80ce7acde4 100755 (executable)
@@ -107,11 +107,13 @@ fi
 if [ -n "$LVS" ] ; then
     info "Scanning devices $lvmdevs for LVM logical volumes $LVS"
     lvm lvscan --ignorelockingfailure 2>&1 | vinfo
-    if [ -z "$sysinit" ]; then
-        lvm lvchange --yes -ay --ignorelockingfailure $nopoll --ignoremonitoring $LVS 2>&1 | vinfo
-    else
-        lvm lvchange --yes -ay $sysinit $LVS 2>&1 | vinfo
-    fi
+    for LV in $LVS; do
+        if [ -z "$sysinit" ]; then
+            lvm lvchange --yes -ay --ignorelockingfailure $nopoll --ignoremonitoring $LV 2>&1 | vinfo
+        else
+            lvm lvchange --yes -ay $sysinit $LV 2>&1 | vinfo
+        fi
+    done
 fi
 
 if [ -z "$LVS" -o -n "$VGS" ]; then