Skip to contentSkip to conversation

md device naming question

DISCUSSION maximilian attems 3 participants 3 messages Sep 19, 2007 – Sep 25, 2007 MD RAID

lore
Share & tools
lore
#0 lore raw

hello,

working on initramfs i'd be curious to know what the /sys/block entry of a /dev/md/NN device is. have a user request to support it and no handy box using it.

i presume it may also be /sys/block/mdNN ?

thanks

Signature · 1 line
maks
#1 lore raw
Quoted 7 lines · maximilian attems

hello,

working on initramfs i'd be curious to know what the /sys/block entry of a /dev/md/NN device is. have a user request to support it and no handy box using it.

i presume it may also be /sys/block/mdNN ?

That's it, e.g. /sys/block/md0. Notable subdirectories include holders/ (block devices within the array, more than one if e.g. LVM is in use), slaves/ (block devices making up the array) and md/ (RAID-specific state).

Signature · 2 lines
`Some people don't think performance issues are "real bugs", and I think 
such people shouldn't be allowed to program.' --- Linus Torvalds
#2 lore raw
Quoted 8 lines · Nix
Quoted 2 lines · maximilian attems

i presume it may also be /sys/block/mdNN ?

That's it, e.g. /sys/block/md0. Notable subdirectories include holders/ (block devices within the array, more than one if e.g. LVM is in use),

Also, if you mount the raid as a partitionable one, /sys/block/md_dNN ;

mdadm has pretty decent handling of all the names (check out auto options, both usable in mdadm.conf and from command line). Also from my experience, if you try to use udev on partitionable arrays, partition related uevents will be delayed until next mdadm invocation, or some partition related command (like fdisk).