What determines mdraid minor device numbers

Bruno Wolff III bruno at wolff.to
Tue Dec 20 16:25:51 UTC 2011


On Sun, Nov 13, 2011 at 15:30:32 -0500,
  Sam Varshavchik <mrsam at courier-mta.com> wrote:
> 
> At bootup, the new array gets automounted on /dev/md127 for some
> reason. Everything's fine, I see no issues except for the unexpected
> device minor number.
> 
> Anyone care to enlighten me, how mdraid minor numbers get handed
> out, and why the one I manually created comes up as a high number,
> even though the next free minor device is, obviously, /dev/md3.

Some of this is controlled by /etc/mdadm.conf. This file is used when
running dracut to build an initramfs.

For arrays that aren't listed in /etc/mdadm.conf, I think udev gets to
pick the names. They seem to start at 127 and go up.

There is also a minor number that is stored in the superblocks, but it
doesn't seem to force that number to be part of the device name.


More information about the users mailing list