Beolach a écrit :
On Tue, Nov 3, 2009 at 02:37, Stephane Bunel
<stephane.bunel@xxxxxxxxxxxxxxxxx> wrote:
Neil Brown a écrit :
(...)
On your system, /dev/char/21:0 is a block device (or a link to a block
device) so there is clearly some sort of configuration error.
All files in /dev/char are symlinks (see below). Rules are comming from
Gentoo.
If you still cannot find it, maybe you could show us the change you
made to udev.rules, and an 'ls -l' of '/dev/char'. That might help
shed some light on your situation.
Considering mdadm is only involved by "real" block device file, why not just
skipping symlink ?
o Udev rules used to rename /dev/sd[ab]:
#cat 65-persistent-block.rules
ENV{PHYSDEVPATH}=="/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0",
NAME="raid_disk0"
ENV{PHYSDEVPATH}=="/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0",
NAME="raid_disk1"
Try prepending SUBSYSTEM=="block" to those, so they they'll only match
the (block) sd* devices, and not the (char) sg? devices:
SUBSYSTEM=="block",
ENV{PHYSDEVPATH}=="/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0",
NAME="raid_disk0"
SUBSYSTEM=="block",
ENV{PHYSDEVPATH}=="/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0",
NAME="raid_disk1"
Well done!! This correct the sg* link issue.
#mdadm --detail /dev/md0
(...)
Number Major Minor RaidDevice State
0 8 0 0 active sync /dev/block/8:0
1 8 16 1 active sync /dev/block/8:16
(...)
But we loop back to the original problem. mdadm show '/dev/block/8:0' instead
of '/dev/raid_disk0' (as i wish). This because the symlink '/dev/block/8:0' is
shorter than the real block file name '/dev/raid_disk0'.
Actual heuristic prevents renaming of real block device name as desired under
penalty of seeing symlinks from /dev/block/*.
maybe mdadm could change this behavior by:
o always prefers real bloc file over symlinks.
o simply skips symlinks.
o changing the heuristic like proposed by my patch (prefer the name that is
closer to /dev).
Stéphane Bunel.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html