Bug#549083: Not working with 3.0.3-2
Neil Brown
neilb at suse.de
Mon Nov 9 04:34:37 UTC 2009
On Sunday November 8, berberic at fmi.uni-passau.de wrote:
> hello,
>
> Am Sonntag, den 08. November schrieb M G Berberich:
> > still not working with mdadm 3.0.3-2. During boot it failes with:
> >
> > Begin: Assemble all MD arrays ... Failure: failed to assemble all arrays
> >
> > and then can't mount the root-fs. Downgrading to mdadm 2.6.7.2-3 makes
> > it work again, but breaks a lot of dependies in dpkg/apt.
>
> I found out that the problem was that the $,1r|(Bmdadm --assemble $,1s&r}(B-call
> failed because of the names of the arrays. For root:
>
> sda2 has wrong name
>
> So I tried to remove the $,1r|(Bname='hermione':2$,1r}(B (and all the others) from
> /etc/mdadm/mdadm.conf and now it boots.
>
> Result: This does not boot:
>
> ARRAY /dev/md/2 level=raid1 metadata=1.0 num-devices=2 UUID=edc699ab:86dacff1:4b646c0c:73e9f59e name='hermione':2
>
> this does:
>
> ARRAY /dev/md/2 level=raid1 metadata=1.0 num-devices=2 UUID=edc699ab:86dacff1:4b646c0c:73e9f59e
>
> calling $,1r|(Bmdadm --detail --scan$,1r}(B still gives the same names:
>
> $,1s&
(B> ARRAY /dev/md/2 metadata=1.00 name='hermione':2 UUID=edc699ab:86dacff1:4b646c0c:73e9f59e
> $,1s&(B
>
I wonder where those "'" characters are coming from.
Presumably it should be
..... name=hermione:2 ....
Looking around the initrd someone else posted I find in
scripts/local-top/mdadm
the code:
[ -n "${MD_HOMEHOST:-}" ] && extra_args="--homehost='$MD_HOMEHOST'"
if $MDADM --assemble --scan --run --auto=yes $extra_args; then
That is wrong.
It will cause the --homehost string given to mdadm to have single
quotes around it. It should be
[ -n "${MD_HOMEHOST:-}" ] && extra_args="--homehost=$MD_HOMEHOST"
if $MDADM --assemble --scan --run --auto=yes ${extra_args:+"$MD_HOMEHOST"}; then
so that spaces in MD_HOMEHOST will be protected, but quotes won't
be passed through (isn't Bourne-Shell a wonderful programming
language!!).
I cannot see how that bug would cause the current problem, but it
should still be fixed.
Actually, having spaces in the hostname would break lots of things, so
all that extra quoting really is pointless. So this would be
adequate.
[ -n "${MD_HOMEHOST:-}" ] && extra_args="--homehost=$MD_HOMEHOST"
if $MDADM --assemble --scan --run --auto=yes $extra_args ; then
NeilBrown
More information about the pkg-mdadm-devel
mailing list