Developers Documentation

×

Warning

301 error for file:https://clearos.com/dokuwiki2/lib/exe/css.php?t=dokuwiki&tseed=82873f9c9a1f5784b951644363f20ef8

User Tools

Site Tools


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.

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=85a6e7&media=content:en_us:7_ug_installation_destination.png

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'.

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=eae114&media=content:en_us:7_ug_installation_destination_configure_2_drives.png

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.

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=581402&media=content:en_us:7_ug_manual_partitioning_remove_previous.png

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.

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=a6891d&media=content:en_us:7_ug_manual_partitioning_delete_all.png

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.

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=c86a87&media=content:en_us:7_ug_manual_partitioning_blank_partitions1.png

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'.

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=ba8368&media=content:en_us:7_ug_manual_partitioning_add_boot_partition2.png

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”

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=e15119&media=content:en_us:7_ug_manual_partitioning_select_raid_device1.png

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.

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=cbc44b&media=content:en_us:7_ug_manual_partitioning_select_raid1_selected1.png

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.

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=a4c0af&media=content:en_us:7_ug_manual_partitioning_finalizing_raid1.png

Review your settings and then click 'Done'.

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=91b316&media=content:en_us:7_ug_manual_partitioning_confirm_actions.png

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:

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=924cdf&media=content:en_us:7_ug_validating_raid1.png

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:

mount

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.

content/en_us/7_d_raid_1_-_mirroring.txt · Last modified: 2015/10/22 11:47 (external edit)

https://clearos.com/dokuwiki2/lib/exe/indexer.php?id=content%3Aen_us%3A7_d_raid_1_-_mirroring&1710828874