Linux md RAID: /dev/md0 vs. /dev/md/0

you can name array as own name (not only 0-127) and since mdadm 3.0.3 you can use only name. If think path was changed to use subfolder /dev/md/$name to make more flexibility or some kind of clean or group arrays. If md array is created in format /dev/mdX there is added symlink to make compability to new format.


When it comes to device names, better ask udev. To my understanding,

  1. md%d naming is used by kernel, it is generated directly by driver md.c#L5646, and it's used in /proc/partitions and sysfs. Hence, it appears in /dev

  2. /dev/md/... and /dev/disk/by-id/... are generated as symlinks by udevd. In my system corresponding rules are kept in /usr/lib/udev/rules.d/63-md-raid-arrays.rules:

    ENV{DEVTYPE}=="disk", ENV{MD_DEVNAME}=="?*", SYMLINK+="md/$env{MD_DEVNAME}"
    

It seems that udev file comes from openSUSE 11.1-rc3 according to this commit in mdadm. I've checked this file in openSUSE 11.0, but it doesn't have md/%d symlinks...

Tags:

Debian

Mdadm

Md