LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Reassembling a raid device (http://www.linuxquestions.org/questions/linux-newbie-8/reassembling-a-raid-device-765751/)

geek.ksa 10-31-2009 06:18 AM

Reassembling a raid device
 
Hi,

I have a question that has been puzzling me since last night. I had a raid device /dev/md0 configured with raid 1 ( two devices). I stopped the array (mdadm -S /dev/md0).. If you look at /proc/mdstat, the device is not active, nothing in there.

So, To assemble the array, I did:

Code:

mdadm -A /dev/md0 /dev/hda6 /dev/hda7
The raid device is now assembled and active.

The question is: how could linux have known about what the raid level is and other raid configuration given that I had no raid configuration file?

I was thinking that such data is stored on the disks somewhere! or something like that.

Could someone help figure this out?

bertl 10-31-2009 06:08 PM

This information is kept in a small block of meta information at the start of members of a raid set. Read about it in the good old software raid howto:

http://tldp.org/HOWTO/Software-RAID-HOWTO-5.html#ss5.9
http://tldp.org/HOWTO/Software-RAID-HOWTO-7.html#ss7.2

.. and there's an entry here:
http://linux-raid.osdl.org/index.php/Superblock

-Bert

geek.ksa 11-01-2009 04:21 AM

Thanks alot Bert. It all boils down to "persistent blocks" on raid members!


All times are GMT -5. The time now is 05:51 AM.