userguides:clearos_5.2:user_guide:configuring_partitions_and_raid

Configuring Partitions and RAID

For some installations, you may want to define a custom partition scheme instead of using the default. Typically, custom partitioning is required for:

  • Software RAID
  • Creating a separate /home or /data partition

If you decide to use the default partitioning method instead of the custom partition RAID method, the system will create a 78 megabyte partition for '/boot', it will create a swap partition to match the size of RAM you have allocated to the system, and will place the remaining space for the root filesystem '/'.

Partition RAID - Select Advanced Partitioning

If you do not wish to use the default partitioning scheme on your system, then select I will do my own partitioning in the installation wizard. You should be familiar with disk partitioning concepts and Linux requirements for space when using this option.

The tool for creating partitions will appear at a later stage in the installer. Continue with the rest of the installation wizard after selecting the partition type on this screen.

Partition RAID - Using the Disk Druid Partition Tool

The installation process uses the Disk Druid partitioning tool to allocate space for your system. This tool allows for creating software RAID, Logical Volumes, swap space, and regular partitions. The system is capable of creating ext2, ext3, swap, LVM, RAID, and vfat partition types.

When you launch the partition tool, you may get a message indicating that the partition is unreadable. This is normal for blank disk drives or when non-standard partition tables are used with your existing disk. Chose Yes to create the partition table.

From the Disk Druid menu you can partition the disk(s). Listed below are some typical examples of some custom disk configurations and how to set them up.

Partition RAID - Example: Software RAID 1

ADVANTAGES

  • Bootable
  • High level of protection

DISADVANTAGES

  • Costly
  • No improvement for disk performance

RAID 1 is often used as a way to protect the drives on which the operating system is running or as an entry-level solution for basic data protection. It is also called 'mirroring' or 'duplexing' (if the drives are on separate controllers). All data on the drive is mirrored from one partition to another. Data read occur from one drive only and data write operations are performed to both. RAID 1 is a well-rounded solution if basic redundancy is your goal. Here is a step-by-step guide to implement Software RAID 1 on regular IDE/SATA/SAS hard disks.

Partition RAID - Preparing the Hardware

For software RAID 1, you need two hard disks. 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.

Choose 'Create custom layout' at the menu in Disk Druid. Once you are in the Partitioning tool you will be able to navigate and change the drive partitions.

In our example, we are using two SATA disks on two different disk controllers. These hard disks are detected in Linux as:

  • /dev/sda
  • /dev/sdc

Partition RAID - Deleting Existing Partitions

Some hard disks may have partitions already defined. These existing partitions (if any) must first be deleted.

  • Use the tab key to move to the main window (one tab after highlighting the Back button)
  • Use the up/down arrows to select a partition
  • Use the tab key to highlight the Delete button and hit return
  • Repeat until all partitions are deleted

Partition RAID - Creating the Swap Partition

After all the partitions are deleted, we can start our RAID configuration. First, we are going to start with the swap memory partitions. Putting swap memory on a software RAID partition is not recommended. For this reason, simply create swap partitions on both hard disks.

  • Tab to the New button and hit return
  • Tab down to File System Type and select swap
  • Tab to Allowable Drives and mark only sda and take the mark off of sdc.
  • Tab down to Size (MB) and type in the size of your RAM in megabytes (MB)
  • Tab down to OK and hit return.

Repeat the same process, but this time mark sdc as an allowable drive and take the mark off of sda.

Partition RAID - Creating RAID Partitions

The boot partition (/boot) is where we are going to start with our RAID solution.

  • Tab to the New button and hit return
  • Tab down to File System type and select software RAID
  • Tab to Allowable Drives and mark only sda and take the mark off of all the other drives.
  • Tab down to Size (MB) and type in 100
  • Leave the mark on 'Fixed Size'
  • Tab down to OK and hit return.

Repeat the same process, but this time mark sdc as an allowable drive and take the mark off of all the other drives. Now that we have two identical 100 MB partitions on both disks, we can create the software RAID disk:

  • Tab to the RAID button and hit return
  • Type in /boot in the Mount Point field
  • Tab to RAID Level and select RAID1
  • Tab to RAID Members and make sure the two partitions created earlier are selected

This example creates the /boot partition. Go through the same process for the root partition (/) and optionally any other partition that you want to create (/home, /var, etc.).

Partition RAID - Configuring the Boot Loader

We are almost done with the software RAID configuration. Next, the installation wizard will ask for the boot loader settings.

  • Select GRUB as your boot loader
  • Disable the boot password (unless you really need it)
If have trouble booting up your system with GRUB, you can use the LILO boot loader as an alternative. However, you will need to type the following on the first installation screen: linux lilo.

If the secondary disk fails (/dev/sdc), then the system will still be bootable. If the primary disk fails (/dev/sda), then your system will not boot. In order to make the secondary disk bootable as well, run the following command:

grub-install /dev/sdc

Partition RAID - Example: Software RAID 5

ADVANTAGES

  • Fast Read Access
  • Cost effective
  • Can make very large volumes

DISADVANTAGES

  • Nominal Write speed improvements
  • Multiple disk failure destroys all data
  • Not bootable

RAID 5 is typically used on volumes where redundancy is required and optimum capacity is needed. This form of RAID Partition is also called 'striping with parity' and works by spreading the data across all the disks. Moreover a checksum is maintained and spread across all disks in such a manner that a single drive failure out of the whole array is tolerable. RAID 5 is typical for many storage servers.

Partition RAID - Preparing the Hardware

For software RAID 5, you need at least three hard disks. Since the RAID partitions on both the hard disks must be of equal size, it is a good idea to use hard disks with (roughly) the same storage capacity.

In our example, we are using three SATA disks. These hard disks are detected in Linux as:

  • /dev/sdb
  • /dev/sdc
  • /dev/sdd

For purposes of this demonstration we will assume that /dev/sda is used for the system RAID partition, swap, and boot partition.

Please refer to the section above on RAID 1 if you need assistance in removing existing partitions.

Please refer to the section above in the RAID 1 section for the boot partition options that are prompted by the installer once you have concluded creating the partitions.

Partition RAID - Creating RAID 5 Partition

We will create a large RAID 5 volume for our file server using /var/flexshare/shares as our mount point. This will allow our file server to optimize for space.

  • Tab to the New button and hit return

  • Tab down to File System type and select software RAID
  • Tab to Allowable Drives and mark only sdb and take the mark off of all the other drives.
  • Tab down to radio buttons and select 'Fill all available space'
  • Tab down to OK and hit return.

Repeat the same process for sdc and sdd, be sure to mark the correct allowable drive and take the marks off of all the other drives.

Now that we should have three identical configurations, we can create the software RAID disk:

  • Tab to the RAID button and hit return
  • Type in /var/flexshare/shares in the Mount Point field
  • Tab to RAID Level and select RAID5
  • Tab to RAID Members and make sure the three partitions created earlier are selected

Once completed, click OK and continue through the GRUB installation process.

Partition RAID - Example: Software RAID 0

ADVANTAGES

  • Fast Read/Write access
  • Can make very large volumes

DISADVANTAGES

  • Failure rate higher than single disk and failure rate increases with each additional drive
  • Not bootable

RAID 0 is typically used when speed is the only concern. This form or RAID is also called 'striping'. All the data in this type of array is spread over all the disks and the server is able to write and read the data quickly because it can read from all disks in the array simultaneously. RAID 0 is often used for high performance application servers and database servers where the data does not need protection or is preserved in some other manner.

Preparing the Hardware - Partition RAID

For software RAID 0, you need at least two hard disks. Since the RAID partition on both the hard disks must be of equal size, it is a good idea to use hard disks with (roughly) the same storage capacity.

In our example, we are using two SATA disks. These hard disks are detected in Linux as:

  • /dev/sdb
  • /dev/sdc

For purposes of this demonstration we will assume that /dev/sda is used for the system partition, swap, and boot partition.

Please refer to the section above on RAID 1 if you need assistance in removing existing partitions.

Please refer to the section above in the RAID 1 section for the boot partition options that are prompted by the installer once you have concluded creating the partitions.

Partition RAID - Creating RAID 0 Partition

We will create a RAID 0 volume for our MySQL server using /var/lib/mysql as our mount point. This will allow our database server to optimize for speed.

  • Tab to the New button and hit return

  • Tab down to File System type and select software RAID
  • Tab to Allowable Drives and mark only sdb and take the mark off of all the other drives.
  • Tab down to radio buttons and select 'Fill all available space'
  • Tab down to OK and hit return.

Repeat the same process for sdc and, be sure to mark the correct allowable drive and take the marks off of all the other drives.

Now that we should have two identical configurations, we can create the software RAID disk:

  • Tab to the RAID button and hit return
  • Type in /var/lib/mysql in the Mount Point field
  • Tab to RAID Level and select RAID0
  • Tab to RAID Members and make sure the two partitions created earlier are selected

Once completed, click OK and continue through the GRUB installation process.

Partition RAID - Notes on Software RAID 6

ADVANTAGES

  • Fast Read Access
  • More reliable than RAID 5
  • Can make very large volumes

DISADVANTAGES

  • Nominal Write speed improvements
  • Multiple disk failure destroys all data
  • Not bootable

RAID 6 is very similar to RAID 5 except that there are two drives allocated to parity instead of one. RAID 6 is more effective than RAID 5 with hot spare because the parity is maintained throughout instead of creation at the point of failure. This form or RAID Partition is typically used on volumes where extra redundancy is required and optimum capacity is needed. This form of RAID is similar to HP's ADG RAID and works by spreading the data across all the disks. Moreover a two checksums are maintained and spread across all disks in such a manner that the RAID can tolerate two disk failures. RAID 6 is typical for many storage servers.

RAID 6 require 4 disks at a minimum. Configure RAID 6 in the same manner as RAID 5 but select RAID 6 instead during the RAID creation process.

Partition RAID - Testing Software RAID

You can validate your RAID system by looking at the status of the drive using the 'cat /proc/mdstat' command. You can also validate RAID1 and RAID 5 systems by removing a RAID member.

Partition RAID - Gathering RAID statistics

The Proc subsystem will show you up-to-date information about your RAID members. Issue the following command to see the status of your RAID:

cat /proc/mdstat

Partition RAID - Redundancy Validation

Another way to validate redundancy is to manually create a 'failed' condition by physically disconnecting a RAID member. This is recommended for new systems as a way to validate this feature before production data is committed to the volume.

  • Power down the machine
  • Unplug the data connector from the drive (just unplugging the power is going to make the BIOS unhappy and the system will not be bootable)
  • Power up the machine
  • Check the data and the volume status
  • Power down the machine and re-attach the drive
  • Use 'watch cat /proc/mdstat' and monitor the volume in recover mode
userguides/clearos_5.2/user_guide/configuring_partitions_and_raid.txt · Last modified: 2020/05/07 13:12 (external edit)