Bug#618561: Improper handling of multiple not-running arrays in mdadm-raid

Michael Tautschnig mt at debian.org
Wed Mar 16 12:32:22 UTC 2011


Package: mdadm
Version: 3.1.4-1+8efb9d1
Severity: minor

When executing mdadm-startall on a system with multiple (yet not running) arrays
I noticed the following warning, despite things otherwise working fine:

test: 259: /lib/init/rw/.mdadm/md0-uevent: unexpected operator

Changing /etc/init.d/mdadm-raid to /bin/bash and adding some debug output I got:

STATEDIR:/lib/init/rw/.mdadm uevent:/sys/block/md*/uevent sentinel:md*-uevent
+ test -e /lib/init/rw/.mdadm/md0-uevent /lib/init/rw/.mdadm/md1-uevent
/etc/init.d/mdadm-raid: line 180: test: /lib/init/rw/.mdadm/md0-uevent: binary operator expected

where line 180 is in fact line 176 in the original script. The simple reason is
that * is expanded only here as

# ls /sys/block/md*/uevent
ls: cannot access /sys/block/md*/uevent: No such file or directory

Maybe my setup is very specific as all this occurred because I intentionally
stopped my arrays, but it would still be nice if this were handled more
gracefully.

Many thanks,
Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-mdadm-devel/attachments/20110316/54e0695b/attachment.pgp>


More information about the pkg-mdadm-devel mailing list