[CentOS] Raid1 on CentOS 5.x 64bit

Fri Apr 10 16:02:42 UTC 2009
Paul Heinlein <heinlein at madboa.com>

On Fri, 10 Apr 2009, Matt wrote:

>>> Does anyone know of a howto on setting up raid1 on CentOS 5.x 64 bit?
>>
>> At install-time or after the machine is already running?
>
> I was trying at install time.

At install time, kickstart is the cleanest way to set up RAID. If 
you've got the time, do one install (sans RAID setup), making sure 
that you correctly specify your network, packages, etc.

After the installation, you'll have a /root/anaconda-ks.cfg that can 
be used as a blueprint for your kickstart installation. It will 
include a comment to the effect of

# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work

followed by the disk layout section. That's the section to massage a 
bit. Here's my kickstart directives for RAID1 layout of three 
partitions( "/", "/boot", and swap):

----- %< -----
bootloader --location=partition --driveorder=sda,sdb
clearpart --all --initlabel
part raid.01 --size=300  --ondisk=sda --asprimary
part raid.02 --size=300  --ondisk=sdb --asprimary
part raid.11 --size=1024 --ondisk=sda --asprimary
part raid.12 --size=1024 --ondisk=sdb --asprimary
part raid.21 --size=1    --ondisk=sda --asprimary --grow
part raid.22 --size=1    --ondisk=sdb --asprimary --grow
raid /boot --fstype ext3 --level=RAID1 --device=md0 raid.01 raid.02
raid swap  --fstype swap --level=RAID1 --device=md1 raid.11 raid.12
raid /     --fstype ext3 --level=RAID1 --device=md2 raid.21 raid.22
----- %< -----

> Although, how difficult is it to make a .386 CentOS 4.x box raid 
> that currently is not raid?

I've never retrofitted a box for RAID, but I suspect it'd be tricky 
unless you're just creating/moving non-system partitions like /home, 
/opt, /srv, and the like.

-- 
Paul Heinlein <> heinlein at madboa.com <> http://www.madboa.com/