Bug#641886: /etc/cron.daily/mdadm fails if mdadm monitor daemon is already running

NeilBrown neilb at suse.de
Mon Sep 19 00:38:06 UTC 2011


On Sat, 17 Sep 2011 07:02:18 +0000 Jamie Heilman
<jamie at audible.transient.net> wrote:

> Package: mdadm
> Version: 3.2.2-1
> 
> /etc/cron.daily/mdadm:
> mdadm: Only one autorebuild process allowed in scan mode, aborting
> run-parts: /etc/cron.daily/mdadm exited with return code 1
> 
> root at cucamonga:~# /etc/init.d/mdadm stop
> Stopping MD monitoring service: mdadm --monitor.
> root at cucamonga:~# mdadm --monitor --scan --oneshot
> root at cucamonga:~# /etc/init.d/mdadm start
> Starting MD monitoring service: mdadm --monitor.
> root at cucamonga:~# mdadm --monitor --scan --oneshot
> mdadm: Only one autorebuild process allowed in scan mode, aborting
> 
> So yeah... that isn't gonna work.
> 


Work-around is to add --no-sharing option to --oneshot.
i.e.

  mdadm --monitor --scan --oneshot --no-sharing

Fix is to apply this patch which effectively does the same thing.

diff --git a/mdadm.c b/mdadm.c
index 4b817ab..1533510 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -841,6 +841,7 @@ int main(int argc, char *argv[])
 			continue;
 		case O(MONITOR,'1'): /* oneshot */
 			oneshot = 1;
+			spare_sharing = 0;
 			continue;
 		case O(MONITOR,'t'): /* test */
 			test = 1;

This will be in mdadm upstream in the next 24hours.

Thanks for the report.

NeilBrown
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-mdadm-devel/attachments/20110919/e6642b33/attachment.pgp>


More information about the pkg-mdadm-devel mailing list