]> git.pld-linux.org Git - packages/systemd.git/blobdiff - pld-storage-init.sh
Release: 12. Using vgscan --cache on startup.
[packages/systemd.git] / pld-storage-init.sh
index 451f1bb32a1e37a2797d54378963e28f85fc28c0..7673c5933fe9b4a6f3b850ae99186ae7f6df2f12 100644 (file)
@@ -6,7 +6,7 @@
 if ! is_no "$DM_MULTIPATH" && [ -x /sbin/multipath ]; then
        modprobe -s dm-mod >/dev/null 2>&1
        modprobe -s dm-multipath >/dev/null 2>&1
-       /sbin/multipath -u -v 0
+       /sbin/multipath -v 0
        [ -x /sbin/kpartx ] && /sbin/dmsetup ls --target multipath --exec '/sbin/kpartx -u -a -p p'
 fi
 
@@ -27,11 +27,13 @@ if [ -x /sbin/dmraid ]; then
 fi
 
 # Start any MD RAID arrays that haven't been started yet
-[ -r /proc/mdstat ] && [ -r /dev/md/md-device-map ] && /sbin/mdadm -IRs
+[ -r /proc/mdstat ] && /sbin/mdadm -As --auto=yes --run 2>&1
 
 if ! is_no "$LVM2" && [ -x /sbin/lvm ]; then
        modprobe -s dm-mod >/dev/null 2>&1
-       run_cmd "Scanning for LVM volume groups" /sbin/lvm vgscan --ignorelockingfailure
+       # --cache to initiate direct device scan and update lvmetad appropriately (if running).
+       # See http://lists.pld-linux.org/mailman/pipermail/pld-devel-pl/2016-January/157230.html
+       run_cmd "Scanning for LVM volume groups" /sbin/lvm vgscan --ignorelockingfailure --cache
        run_cmd "Activating LVM volume groups" /sbin/lvm vgchange -a y --sysinit
        /sbin/lvm vgmknodes --ignorelockingfailure
 fi
This page took 0.038858 seconds and 4 git commands to generate.