[CentOS] Reassemble software RAID

Kai Schaetzl maillists at conactive.com
Wed Nov 26 13:40:49 UTC 2008


I have a machine on CentOS 5 with two disks in RAID1 using Linux software 
RAID. /dev/md0 is a small boot partition, /dev/md1 spans the rest of the 
disk(s). /dev/md1 is managed by LVM and holds the system partition and 
several other partitions. I had to take out disk sda from the RAID and low 
level format it with the tool provided by Samsung. Now I put it back and 
want to reassemble the array.
Machine boots fine from sdb and I was able to re-add /dev/sda1 to /dev/md0 
easily. However, I can't do the same with /dev/sda2 to /dev/md1 because 
there's no /dev/md1 anymore and mdadm tells me it doesn't have the RAID 
superblock.
If possible I want to avoid deleting the already existing setup and data.
I'm wondering what I shall do next. Can I simply create /dev/md1 as if it 
was a new array? Is the problem created by the fact that the running 
system was booted from a logical volume on /dev/sda2? Should I better boot 
the system from a live CD and then reassemble/create anew /dev/md1?

In general, would it be better to *not* put the main system on a logical 
volume on a RAID partition? (The other logical volumes carry virtual 
machines.) Thus:
/dev/md0 with /boot
/dev/md1 with / (no LVM on it)
/dev/md2 managed by LVM


Kai

-- 
Kai Schätzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com





More information about the CentOS mailing list