Software RAID1 on RHEL and CentOS

A visual how to guide to creating basic RAID1 on Red Hat Enterprise Linux and CentOS. We will be creating 1 gigabyte swap partition and using the remaining space for /.

Boot up Red Hat Enterprise Linux or CentOS installation media. Once you have reached the disk utility select Remove all partitions on selected drives and create default layout, select the drives that you would like to use, and check Review and modify partitioning layout.

Remove the default partition layout by deleting all of the partitions and LVM volumes.

Creating swap

Press on the RAID button and select Create a software RAID partition.

Select software RAID under File System Type, check the first disk under Allowable Devices, put 1000 under Size, select Fixed size under Additional Size Options, and check Force to be a primary partition.

At the main disk partitioning screen press the RAID button and select Create a software RAID partition, again.

Select software RAID under File System Type, check the second disk under Allowable Devices, put 1000 under Size, select Fixed size under Additional Size Options, and check Force to be a primary partition.

At the main disk partitioning screen press the RAID button, select Create a RAID device [default=/dev/md0] and hit OK.

Under File System Type select swap, select RAID1 under RAID Level, check both hard drives under RAID Members, and hit OK. Your swap partition is now done.

Creating /

Press on the RAID button and select Create a software RAID partition.

Select software RAID under File System Type, check the first disk under Allowable Devices, leave 100 under Size, select Fill to maximum allowable size (which will override the 100), and check Force to be a primary partition.

Press the RAID button and select Create a software RAID partition. Select software RAID under File System Type, check the second disk under Allowable Devices, leave 100 under Size, select Fill to maximum allowable size (which will override the 100), and check Force to be a primary partition.

Press the RAID button and select Create a RAID device [default=/dev/md1] and hit OK.

Select / under Mount Point, RAID1 under Raid Level, check both hard drives, and hit OK. / partition is now done.

Final Steps

Leave the default settings for GRUB boot loader.

Continue with your installation, once you are done just make sure that everything is as expected.

\[root@localhost ~\]# cat /proc/mdstat
Personalities : \[raid1\]
md0 : active raid1 hdb2\[1\] hda2\[0\]
      1020032 blocks \[2/2\] \[UU\]

md1 : active raid1 hdb1\[1\] hda1\[0\]
      19936512 blocks \[2/2\] \[UU\]