Skip to contentSkip to conversation

mdadm 1.x device naming

DISCUSSION Colin Watson 3 participants 3 messages Jul 2, 2010 – Jul 6, 2010

lore
Share & tools
lore
#0 lore raw

I've been looking at Felix's raid branch which adds support for mdadm metadata version 1.x, and trying to bring it up to date. The first thing I noticed was an issue with device naming. With mdadm metadata 0.9, md devices were just numbered. Easy. With mdadm metadata 1.x, devices can also be named, which gives you things like /dev/md/home. (There's also a "homehost" quirk for arrays that can be attached to multiple hosts; I propose to ignore this for now.)

In many ways this is better. Named devices means that you're not relying on enumeration which means that devices aren't going to move around, which is always good for GRUB. Thus, I don't think we should invent an enumeration scheme and I certainly don't think we should require entries in device.map to map /dev/md/home to (md0), or whatever; that just takes us back to the bad old days. However, we do need some way to name the device in GRUB.

Does anyone object to this simple scheme?

/dev/md/NAME => (md/NAME)
all other md device name formats as before

As far as I'm aware, we don't use slashes in GRUB device names right now, so this is a bit novel; but I wanted to minimise the chance of clashes and confusion, and I don't believe using a slash should actually do any harm.

Thanks,

Signature · 1 line
Colin Watson                                       [[email protected]]
#1 lore raw
Quoted 6 lines · Colin Watson

Does anyone object to this simple scheme?

/dev/md/NAME => (md/NAME)
all other md device name formats as before

I like the idea of prepending a name of subsystem to the named (and not just numbered) devices. In retrospect lvm should have been named this way (lvm/mylvmname).

Quoted 5 lines

As far as I'm aware, we don't use slashes in GRUB device names right now, so this is a bit novel; but I wanted to minimise the chance of clashes and confusion, and I don't believe using a slash should actually do any harm.

We already use slashes on OFW.

Quoted 3 lines

Thanks,

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
#2 lore raw
In reply to Colin Watson

also sprach Colin Watson <[email protected]> [2010.07.02.1513 +0200]:

Quoted 4 lines

Does anyone object to this simple scheme?

/dev/md/NAME => (md/NAME)
all other md device name formats as before

That's what I use in the mdadm package too.

Quoted 4 lines

As far as I'm aware, we don't use slashes in GRUB device names right now, so this is a bit novel; but I wanted to minimise the chance of clashes and confusion, and I don't believe using a slash should actually do any harm.

You could use a dash like LVM too.

And do keep in mind that named arrays still have a super-minor field with the number, just like the 0.9 metadata ones, so you don't have to use names. But I agree that it's better.

Signature · 8 lines
 .''`.   martin f. krafft <[email protected]>      Related projects:
: :'  :  proud Debian developer               http://debiansystem.info
`. `'`   http://people.debian.org/~madduck    http://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems
 
"common sense is the collection of prejudices
 acquired by age eighteen."
                                                    -- albert einstein