Seems like 2 bugs.

mkconf doesn't save the "AUTO" value from the existing mdadm.conf as defaults:

# save existing values as defaults
if [ -r "$CONFIG" ]; then
  DEVICE="$(sed -ne 's/^DEVICE //p' $CONFIG)"
  HOMEHOST="$(sed -ne 's/^HOMEHOST //p' $CONFIG)"
  PROGRAM="$(sed -ne 's/^PROGRAM //p' $CONFIG)"
fi


and then the initramfs-tools/hooks/mdadm looks for ^ARRAY and if not found, it doesn't use the mdadm.conf but rather uses mkconf to generate which of course ignores the AUTO option.


if [ ! -f $CONFIG ]; then

<SNIP>

else
        cp -p $CONFIG ${DESTDIR}/etc/mdadm
        sed -i '/^CREATE/s/^/#/' $DESTMDADMCONF
        if ! grep -q '^ARRAY' $CONFIG; then
                tmpfile="${DESTMDADMCONF}.tmp"
                if /usr/share/mdadm/mkconf > $tmpfile; then
                        cp -p $tmpfile $DESTMDADMCONF
                        rm -f $tmpfile

Reply via email to