Bug#639830: mdadm: alternative md-device names

Michael Tokarev mjt at tls.msk.ru
Sat May 26 14:24:06 UTC 2012


On 26.05.2012 18:11, Michael Tokarev wrote:
[]
> when generating the image.  The only possible case I can think
> of is when you listed
> 
>  INITRDSTART=/dev/md0
> 
> (the same as for root filesystem in fstab), but using /dev/md/0
> in mdadm.conf -- in this case, mkinitramfs reports:
> 
> W: mdadm: I am supposed to start /dev/md0 from the initial ramdisk,
> W: mdadm: yet I cannot find the array in the configuration file.
> W: mdadm: I am thus reverting to starting all arrays.
> 
> But actually it does not start anything during initramfs, in the
> way you observed.

There's one more possibility: both places actually listed /dev/md/0,
but that device - which is just a symlink to ../md0 - did not exist
during (re)creation of initramfs, so due to already mentioned
change the previous piece of the script switched from md/0 to md0.

> Is (was) that the case, can you remember/comment ?

I think we should stop using any prefixes for the devices
anywhere in all scripts, stripping /dev/md and /, and always
generate /dev/md/X - which will create both md/X and mdX.
This is ugly, but will keep the system bootable...

There's another possibility -- to try to detect such a disparity
(when one place uses one name and another place uses alternative
name) and fail if found.  But I like this version less, -- it is
less ugly in case of the device nodes it creates, but it has more
chances to make the system unbootable...

Thanks,

/mjt





More information about the pkg-mdadm-devel mailing list