Configuring RAID1 after install

Jérémie j.tarot at
Sun Mar 19 12:56:27 UTC 2006

Ewan Mac Mahon a écrit :
> On Sat, Mar 18, 2006 at 04:44:35PM -0600, John Lyon wrote:
>> On 3/18/06 4:00 PM, "Ewan Mac Mahon" <ewan at> either wrote,
>> forwarded or quoted:
>>> OK; presumably you've got one disk at the moment, and you're planning to
>>> add a second to create the mirror? 
> <snip>
>> This is exactly my situation. The boot disk has two partitions, '/' and a
>> swap.
>> Shouldn't I create the partitions on the second disk I'm adding to be
>> exactly like the partitions on the current boot disk?
> In practice probably, but not necessarily. It is, of course, important
> that the partitions on each disk that go into the RAID are the same, but
> you don't actually have to use the existing partitions. Let's say you
> wanted to divide things up so you had swap, / and /home on separate
> partitions - you could create the partitions on the new disk the way you
> want them, copy the data over, restart, remove the old partitions from
> from the original disk, and then create a copy of the new layout on it
> to put the RAID on.
> That's entirely optional though, if you're happy with your current
> layout, keep it.

In any option, use the power of sfdisk to dump your disk/partitions 
table layout and easily restore/apply it to another hdd... this reailly 
is the easyest way to have several hdds with the same layout.
+ if your disks happen not to have the same size... who cares ! The dump 
is in text format and can be adapted :)

> Oh, and note that it's probably not worth RAIDing the swap, and if you
> did want to do that it may require some additional fiddling around.

AFAIU, you need to RAID1 your swap if you really want disk failover 
isn't it ?! I have SWAP on /dev/md1 configured from/with the debian 
installer and runs nicely up to now...

Final note for John (and others ;)... another tricky part is bootloader 
setup (google and read carefully), but either lilo and grub will nicely 
boot from RAID1 /boot partition. If you can't find relevant infos, just 
raise your hand ! ;)



More information about the ubuntu-users mailing list