Skip to contentSkip to conversation

more mdadm questions

DISCUSSION rich turner 3 participants 3 messages Sep 1, 2004 MD RAID

lore
Share & tools
lore
#0 lore raw

when mdadm queries information about the raid devices, does it simply get the imformation from /proc/mdstat and format it accordingly?

when mdadm displays information about the block devices raid devices are built on how does it display the name the devices? does it show the devfs name? does it show the mapper name if built on a logical volume? are these names consistent?

what about raid devices that were built with raidtools? does it look in /proc/mdstat for information?

how does mdadm know what devices to query if they are not defined in /etc/mdadm/mdamd.conf with DEVICES?

if devices are missing from the raid device, is there a way of knowing the name of the missing device without the configuration file?

#1 lore raw

On Wednesday 01 September 2004 02:13, rich turner wrote:

Hi Rich,

Not wanting to be blunt an all... but wouldn't most of these questions be
answered by just running mdadm yourself...?

Quoted 2 lines

when mdadm queries information about the raid devices, does it simply get the imformation from /proc/mdstat and format it accordingly?

My guess would be no, since /proc/mdstat gives less info than mdadm does.

Quoted 2 lines

how does mdadm know what devices to query if they are not defined in /etc/mdadm/mdamd.conf with DEVICES?

Don't know how, but since 'mdadm --detail --scan' provides the info you can use to create the mdadm.conf file when missing, mdadm obviously does not rely on getting its info from that file at all.

Quoted 2 lines

if devices are missing from the raid device, is there a way of knowing the name of the missing device without the configuration file?

Yes. Well, it depends on what you call "missing". It will report a failed etc device, but if the array was created with a 'missing' drive it obviously cannot know what device will get added before you actually add it.

greetings,
Maarten

#2 lore raw
In reply to rich turner
Quoted 2 lines · On Tuesday August 31, [email protected] wrote:

when mdadm queries information about the raid devices, does it simply get the imformation from /proc/mdstat and format it accordingly?

It also used the GET_ARRAY_INFO and GET_DISK_INFO ioctls. It also reads the super-block for more information.

Quoted 5 lines

when mdadm displays information about the block devices raid devices are built on how does it display the name the devices? does it show the devfs name? does it show the mapper name if built on a logical volume? are these names consistent?

It hunts through /dev for a special file with the name major/minor numbers, and uses the name of the file.

Quoted 3 lines

what about raid devices that were built with raidtools? does it look in /proc/mdstat for information?

arrays built with raidtools are indistinguishable from arrays built with mdadm.

Quoted 3 lines

how does mdadm know what devices to query if they are not defined in /etc/mdadm/mdamd.conf with DEVICES?

You must be using debian. The conf file should be /etc/mdadm.conf, and is most places.

I'm not sure what the question means. "query" in what sense? The only devices mdadm queries are those that it has been told to query, possibly by /etc/mdadm.conf, possible by command line args.

Quoted 3 lines

if devices are missing from the raid device, is there a way of knowing the name of the missing device without the configuration file?

I'm not sure that question means anything. If device is missing, then it doesn't exist. You can add a spare that will be rebuilt. It can be any un-used device of the right size.

Supposing there was a way of "knowing the name of the missing device", how would you use that information?

NeilBrown