Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

107 views
Skip to first unread message

Jamie Heilman

unread,
Sep 17, 2011, 3:20:01 AM9/17/11
to
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@cucamonga:~# /etc/init.d/mdadm stop
Stopping MD monitoring service: mdadm --monitor.
root@cucamonga:~# mdadm --monitor --scan --oneshot
root@cucamonga:~# /etc/init.d/mdadm start
Starting MD monitoring service: mdadm --monitor.
root@cucamonga:~# mdadm --monitor --scan --oneshot
mdadm: Only one autorebuild process allowed in scan mode, aborting

So yeah... that isn't gonna work.

--
Jamie Heilman http://audible.transient.net/~jamie/
"Paranoia is a disease unto itself, and may I add, the person standing
next to you may not be who they appear to be, so take precaution."
-Sathington Willoughby

--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

NeilBrown

unread,
Sep 18, 2011, 8:50:02 PM9/18/11
to
On Sat, 17 Sep 2011 07:02:18 +0000 Jamie Heilman
<ja...@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@cucamonga:~# /etc/init.d/mdadm stop
> Stopping MD monitoring service: mdadm --monitor.
> root@cucamonga:~# mdadm --monitor --scan --oneshot
> root@cucamonga:~# /etc/init.d/mdadm start
> Starting MD monitoring service: mdadm --monitor.
> root@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
signature.asc
0 new messages