Bug#460256: mdadm: Break dependency loop in init.d script

Petter Reinholdtsen pere at hungry.com
Fri Jan 11 15:20:23 UTC 2008


Package: mdadm
Version: 2.6.2-2
Severity: important

When testing dependency based boot sequencing, a loop was detected
between mdadm and lvm2.  A check make me believe this is because of a
bug in the init.d/mdadm LSB header.

See bug #426108 for information about the loop.

The mdadm script can't depend on $local_fs and $remote_fs and be
inserted at rcS.d sequence 25, as $local_fs is sequence 37, and
$remote_Fs is sequence 47.  This make be believe the dependencies are
wrong, and I suggest replacing them to reflect the current boot order.
The shutdown sequence have similar problems.

Also, the runlevel list is wrong, as the current script is used in
runlevel S, 0 and 6.

Here is a patch to improve the header.  I hope this is correct.

I'm setting severity important as this make it impossible to install
mdadm and lvm2 at the same time when dependency based boot sequencing
is enabled.

diff -ur mdadm-2.6.3+200709292116+4450e59.orig/debian/mdadm.init mdadm-2.6.3+200709292116+4450e59/debian/mdadm.init
--- mdadm-2.6.3+200709292116+4450e59.orig/debian/mdadm.init     2008-01-11 15:53:15.000000000 +0100
+++ mdadm-2.6.3+200709292116+4450e59/debian/mdadm.init  2008-01-11 16:11:42.000000000 +0100
@@ -10,10 +10,11 @@
 #
 ### BEGIN INIT INFO
 # Provides:          mdadm
-# Required-Start:    $local_fs $remote_fs
-# Required-Stop:     $local_fs $remote_fs
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
+# Required-Start:    checkroot
+# Required-Stop:     umountroot
+# Should-Start:      module-init-tools
+# Default-Start:     S
+# Default-Stop:      0 6
 # Short-Description: MD monitoring daemon
 # Description:       mdadm provides a monitor mode, in which it will scan for
 #                    problems with the MD devices. If a problem is found, the

Happy hacking,
-- 
Petter Reinholdtsen





More information about the pkg-mdadm-devel mailing list