LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   raid array metadata info (mdadm) (https://www.linuxquestions.org/questions/linux-server-73/raid-array-metadata-info-mdadm-860453/)

suhas! 02-03-2011 07: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]
MAILADDR root
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?

Regards,

fordeck 02-03-2011 07:39 AM

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


Hope this helps.

Regards,

Fordeck

suhas! 02-18-2011 04: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?

Regards,


All times are GMT -5. The time now is 07:47 AM.