Re: Please explain status/background of /dev/mdX versus /dev/md/X
I don't have much to add...
On Tuesday April 22, madduck@debian.org wrote:
> Frans, all I know is documented in
> http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=blob;f=debian/FAQ,
> item 3.
>
> Anything else, Neil (on Cc) will have to explain... full mail
> further down, with more inline comments from me.
>
> also sprach Frans Pop <elendil@planet.nl> [2008.04.22.1725 +0200]:
> > Hi Martin,
> >
> > Over the past few weeks I've solved several issues in D-I related to the use
> > of /dev/mdX versus /dev/md/X and I've been wondering what the official
> > status is of both as it seems there are at least some inconsistencies.
> >
> > Partman currently prefers the use of /dev/md/X and uses that when creating
> > new RAID devices. This results in both /dev/md/X and /dev/mdX block device
> > files being created.
>
> The latter should be symlinks.
>
> > I've been working on the assumption that /dev/md/X is the "newer" form and
> > that the intention is to transition to that. Is that correct?
>
> Sort of. /dev/md/* corresponds to version-1 superblocks, which are
> supposed to be default in the future, but still are not. I suggest
> you ensure that partman creates version-0 superblocks for now, until
> upstream changes the default.
I don't think there is any correlation between superblock version and
device name in /dev is there? There isn't meant to be.
But now that I look at the code, I see that "--examine --brief" uses
/dev/md/xxx for version1 and /dev/mdxxx for version0.
This is probably because version1 can provide a name (not a number)
for the array, use using names only makes sense under /dev/md/.
I hadn't really intended to make that distinction.....
> > - if a new RAID device is created using /dev/mdX, the "new" block device
> > files are _not_ created
> > - 'mdadm --examine --scan --config=partitions' outputs the "old" block
> > device names which again means that the "new" block devices are not
> > created if that is used as input to assemble existing RAID devices
> >
> > Especially the last issue affected partman when the system being installed
> > had a pre-existing RAID partition setup. I've now worked around that in
> > mdcfg by converting old to new using sed before doing the assemble.
Maybe a flag of mdadm (or a config file option?) to use /dev/md/XXX
names would be appropriate.
> >
> > Could you provide some insight into what the current status is from an mdadm
> > (and maybe kernel) upstream PoV and how the transition is expected to
> > proceed?
The kernel doesn't care.
I would like to make mdadm work equally well with both usages, and let
system-integrators make the decisions :-)
So anything I can do to make mdadm work more nicely for you I will
seriously consider.
--use-dev-subdir ???
NeilBrown
Reply to: