First off let’s get a bit into what RAID is for those that are not familiar.
What is RAID
Redundant Array of Independent Disks; originally Redundant Array of Inexpensive Disks (RAID) is basically a way of storing the same data across multiple disks thereby offering redundancy. Gains are made in I/O (Inout/Output) and RAIDing reduces mean time between failures (MTBF), it increases fault tolerance as well.
To the OS, a RAID array appears a a single logical drive or a series of drives depending on your choice of striping. Striping involves partitioning each drive’s storage space into units ranging from one sector (512 bytes) to several MB or GB. In a multi-user system, better performance requires establishing a stripe wide enough to hold the typical or maximum size record. This allows overlapped disk I/O across drives.
Types of RAID
- RAID-0: This technique has striping but no redundancy of data. It offers the best performance but no fault-tolerance.
- RAID-1: This type is also known as disk mirroring and consists of at least two drives that duplicate the storage of data. There is no striping. Read performance is improved since either disk can be read at the same time. Write performance is the same as for single disk storage. RAID-1 provides the best performance and the best fault-tolerance in a multi-user system.
- RAID-2: This type uses striping across disks with some disks storing error checking and correcting (ECC) information. It has no advantage over RAID-3.
- RAID-3: This type uses striping and dedicates one drive to storing parity information. The embedded error checking (ECC) information is used to detect errors. Data recovery is accomplished by calculating the exclusive OR (XOR) of the information recorded on the other drives. Since an I/O operation addresses all drives at the same time, RAID-3 cannot overlap I/O. For this reason, RAID-3 is best for single-user systems with long record applications.
- RAID-4: This type uses large stripes, which means you can read records from any single drive. This allows you to take advantage of overlapped I/O for read operations. Since all write operations have to update the parity drive, no I/O overlapping is possible. RAID-4 offers no advantage over RAID-5.
- RAID-5: This type includes a rotating parity array, thus addressing the write limitation in RAID-4. Thus, all read and write operations can be overlapped. RAID-5 stores parity information but not redundant data (but parity information can be used to reconstruct data). RAID-5 requires at least three and usually five disks for the array. It’s best for multi-user systems in which performance is not critical or which do few write operations.
- RAID-6: This type is similar to RAID-5 but includes a second parity scheme that is distributed across different drives and thus offers extremely high fault- and drive-failure tolerance.
- RAID-7: This type includes a real-time embedded operating system as a controller, caching via a high-speed bus, and other characteristics of a stand-alone computer. One vendor offers this system.
- RAID-10: Combining RAID-0 and RAID-1 is often referred to as RAID-10, which offers higher performance than RAID-1 but at much higher cost. There are two subtypes: In RAID-0+1, data is organized as stripes across multiple disks, and then the striped disk sets are mirrored. In RAID-1+0, the data is mirrored and the mirrors are striped.
- RAID-50 (or RAID-5+0): This type consists of a series of RAID-5 groups and striped in RAID-0 fashion to improve RAID-5 performance without reducing data protection.
- RAID-53 (or RAID-5+3): This type uses striping (in RAID-0 style) for RAID-3’s virtual disk blocks. This offers higher performance than RAID-3 but at much higher cost.
Software RAID configuration during the installation process using the Disk Druid application. We assume your disks are either new or formatted with no partitions.
You will step through using two drives (/dev/sda and /dev/sdb) to illustrate the creation of simple RAID1 configurations.
Creating the RAID Partitions
- In Disk Druid, choose RAID to enter the software RAID creation screen.
- Choose Create a software RAID partition to create a RAID partition. Note that no other RAID options (such as entering a mount point) are available until RAID partitions, as well as RAID devices, are created.
- A software RAID partition must be constrained to one drive. For Allowable Drives, select the drive to use for RAID. If you have multiple drives, by default all drives are selected and you must deselect the drives you do not want.
- Enter the size that you want the partition to be.
- Select Fixed Size to specify partition size. Select Fill all space up to (MB) and enter a value (in MB) to specify partition size range. Select Fill to maximum allowable size to allow maximum available space of the hard disk. Note that if you make more than one space growable, they share the available free space on the disk.
- Select Force to be a primary partition if you want the partition to be a primary partition. A primary partition is one of the first four partitions on the hard drive. If unselected, the partition is created as a logical partition. If other operating systems are already on the system, unselecting this option should be considered.
- Repeat these steps to create as many partitions as you need for your partitions.
Creating the RAID Devices and Mount Points
Once you create all of your partitions as Software RAID partitions, you must create the RAID device and mount point.
- Select the RAID button on the Disk Druid main partitioning screen.
- Select Create a RAID device from the RAID Options window.
- The Make a RAID Device window appears, do the following:
- Select a mount point.
- Choose the file system type for the partition. At this point you can either configure a dynamic LVM file system or a traditional static ext3/ext4 file system.
- Select a device name such as md0 for the RAID device.
- Choose your RAID level. You can choose from RAID 0, RAID 1, and RAID 5.
- The RAID partitions created appear in the RAID Members list. Select which of these partitions should be used to create the RAID device.
- If configuring RAID 1 or RAID 5, specify the number of spare partitions. If a software RAID partition fails, the spare is automatically used as a replacement. For each spare you want to specify, you must create an additional software RAID partition (in addition to the partitions for the RAID device). Select the partitions for the RAID device and the partition(s) for the spare(s).
- After clicking OK, the RAID device appears in the Drive Summary list.
- Repeat this chapter’s entire process for configuring additional partitions, devices, and mount points, such as the root partition (/), /home/, or swap.
The final layout
Now that you are done setting up your raid, you should have a layout similar to this: