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
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