-   Linux - Server (
-   -   raid array metadata info (mdadm) (

suhas! 02-03-2011 08:12 AM

raid array metadata info (mdadm)
When we assemble a raid array, from where does it load configuration information for that array? I thought it refers to /etc/mdadm.conf file, but in my system, mdadm.conf file doesn't even contain all information. Still it is able to successfully assemble previously created device.

# cat /etc/mdadm.conf
DEVICE /dev/sd[bcdjkl]1
DEVICE /dev/loop[012345]
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=8be34453:45298936:fae1028b:65b2510c

Above, the information about devices that comprises device md0 is not present (e.g. /dev/sda1, /dev/sda2 etc). Its not revealed by mdadm scan either.

# mdadm --detail --scan
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=8be34453:45298936:fae1028b:65b2510c

Still it is able to assemble the device.

# mdadm --assemble /dev/md0
mdadm: /dev/md0 has been started with 2 drives.

How did it find the underlying devices of md0 while assembling it?


fordeck 02-03-2011 08:39 AM

You might want to check out this wiki regarding RAID superblock storage and format.

Hope this helps.



suhas! 02-18-2011 05:26 AM

Thanks for the reply.. that was helpful..

However, there is one more thing I am wondering... I know mdadm uses device mapper only at the backend.. so I decided to get all info about raid array I created with mdadm command through dmsetup command. However when I can still see array status in mdadm --scan command, I am not getting any info in dmsetup info or dmsetup table command. Why is it that, dmsetup should show information abuot mdadm created array right?


All times are GMT -5. The time now is 03:18 PM.