[CentOS] Software Raid Recovery

Fri Feb 20 23:34:41 UTC 2009
Ross Walker <rswwalker at gmail.com>

On Feb 20, 2009, at 1:53 PM, John R Pierce <pierce at hogranch.com> wrote:

> Stephen Leonard Character wrote:
>> So, to change my swap to raid1, I would need to unmount it, delete  
>> the
>> md2 device, and rebuild it as a raid1 md2 device?
>>
>
> swapoff /dev/md2
> # now delete the raid0 and build a raid1
> mkswap /dev/md2
> swapon /dev/md2
>
>
>
> and you probably don't have to change your /etc/fstab assuming the
> metadevice name stays the same.

Since he'll have 4 md partitions after breaking the raid0, create 2  
raid1 mds and add them both as priority 1 swap devices and the kernel  
will stripe pages across them.

-Ross

PS  I prefer to create swap from LVM so to bypass this whole mess all  
together. LVM and RAID both come from device-mapper, so it's proven  
reliable and well performing technology. I wish ZFS was GPL'd though  
so Linux could adopt it and we'd be done talking about file systems  
and volume managers.