[RFC] wait harder for multipath init

Serge Hallyn serge.hallyn at canonical.com
Tue Dec 21 23:25:16 UTC 2010


Hi,

the initramfs-tools/scripts/local-top/multipath script currently
does a udevadm settle before considering itself done.  This will
wait for udev to finish any actions it has started, but can be
insufficient because multipath may not yet have processed some
devices.

The redhat init scripts actually ensure that multipathd has finished
initializing its map before proceeding.  This patch uses the same
loop.  On a machine with 5 disks, without this patch init's mountroot
tries to run before multipath is ready.  With this patch, it
succeeds.

thanks,
-serge

diff -u multipath-tools-0.4.9/debian/changelog multipath-tools-0.4.9/debian/changelog
--- multipath-tools-0.4.9/debian/changelog
+++ multipath-tools-0.4.9/debian/changelog
@@ -1,3 +1,12 @@
+multipath-tools (0.4.9-1proposed1) natty; urgency=low
+
+  * Ensure that multipath has setup all its paths before we proceed
+    with mountroot.  Otherwise, either root or some other device
+    could get mounted by it's block device, after which multipath
+    can't take it.
+
+ -- Serge Hallyn <serge.hallyn at ubuntu.com>  Tue, 21 Dec 2010 16:47:34 -0600
+
 multipath-tools (0.4.9-1) experimental; urgency=low
 
   * New upstream version 0.4.9 (Closes: #587315, #595127)
diff -u multipath-tools-0.4.9/debian/initramfs/local-top multipath-tools-0.4.9/debian/initramfs/local-top
--- multipath-tools-0.4.9/debian/initramfs/local-top
+++ multipath-tools-0.4.9/debian/initramfs/local-top
@@ -46,6 +46,10 @@
 /sbin/multipath -v $VERBOSITY
 verbose && log_end_msg
 
+if [ -x /sbin/kpartx -a -x /sbin/dmsetup ]; then
+	/sbin/dmsetup ls --target multipath --exec "/sbin/kpartx -a -p p" >/dev/null
+fi
+
 if [ -x /sbin/udevadm ]; then
     /sbin/udevadm settle --timeout=10
 fi



More information about the pkg-lvm-maintainers mailing list