RAID 1 - Mirroring

Preparing the Hardware

For software RAID 1, you need at least two hard disks. You can configure RAID 1 across as many disks as you want, meaning that you can have your OS on a partition across every device on your server. Since the RAID partitions on both the hard disks must be of equal size, it is a good idea to use two hard disks with (roughly) the same storage capacity.

To set up RAID at install time, navigate to the 'Installation Destination' section from the installer's Installation Summary page.

Click the radio button for 'I will configure partitioning' and select the two (or more) drives that you want to configure. At least two are required for your RAID 1 partition. Click 'Done'.

If you have previous partitions on your disks and you want to remove them before creating a new partition scheme, do that by highlighting one of the partitions and hit the 'minus' button.

At the confirmation screen, remove the other partitions as well if you are clearing all data on these drives for RAID. Repeat the process until all the disks are clean.

If you have found the system looking like this or this is the result from removing previous partitions, you can configure the ClearOS server to use mirroring. Please note that there are more advanced configurations of ClearOS partitioning than is described here and that we are setting up a simple system with RAID 1 across the board.

Click the 'plus' button in the bottom left corner to start adding mirror partitions. Choose (or type) '/boot' for the mount point and set the desired capacity to '500 MB'. Click 'Add mount point'.

The next page is where the secret sauce happens for RAID in ClearOS 7. Under device type, choose 'RAID'. You will also want to ensure that the Device(s) section has your hard disk and at least "1 other"

Once this is selected, the RAID Level section will appear and you can choose the RAID level you wish to use. Since we are talking about RAID 1, we will validate that 'RAID1 (Redundancy)' is selected.

Click 'Update Settings'.

Continue the process of clicking the "plus" sign and setting up additional partitions. You will want to RAID1 your swap file as well because if a disk fails and swap is NOT in RAID, it will crash the memory pages on the failed disk and crash the system.

We recommend that you use as much swap as you have memory on the system but only use up to 4096 MB of swap if you have more ram than that. Be sure to choose "Device Type: RAID" for all selections and that the Devices listed have at least one disk and 1 other.

For your remainder space, you can leave the desired space setting blank and it will use the remainder of the disk.

Review your settings and then click 'Done'.

You can confirm the actions and then hit 'Accept Changes'.

From here you can continue with the install or make other changes. Once you have finished your install, you can pop into command line from the console by hitting Ctrl+Alt+F2, log in, and then run the following to see the status of your mirrors:

cat /proc/mdstat

or (if you want to see the progress bars progressing):

watch cat /proc/mdstat

Hit Ctrl+C to cancel the watch.

Your output may look something like this:

This shows our 3 devices as RAID1 devices. The '[UU]' indicates that both drives are 'up' in the RAID. We can look to see how these drives are mounted using the mount command:


You will see a corresponding 'md' device for '/boot' and for '/'. You will not see a mounted partition for 'swap' since swap is dynamic memory on disk and doesn't mount.

knowledgebase/start.txt · Last modified: 2024/05/27 01:22 by