Standard RAID consists of levels from 0-5. Each level represents a different application of the technology. For example:
- Level 1 corresponds to mirroring. Mirroring uses n partitions that all store the same data.
- Level 5 corresponds to striping with parity. Striping is the arrangement of contiguous disk blocks across multiple drives instead of within the same drive. The idea behind this arrangement is to increase the efficiency of disk access by allowing concurrent seeks on multiple devices. Parity is the calculation of an additional stripe from the normal data stripes, to be used to recover lost data in the event of a drive failure.
The following table compares and contrasts the various RAID levels.
Level | Characteristics | Advantages | Disadvantages |
Linear | Concatenates small partitions into a larger one | Allows two disks to be used linearly as one, with the capacity of subsequent disks simply added to the first disk | No redundancy; less reliable overall because if one partition fails, the larger one fails |
RAID 0 | Striping | Performance benefits for reads and writes | No fault tolerance |
RAID 1 | Mirroring | Efficient for reads because multiple reads can be done on multiple drives; complete fault tolerance | Diminished write performance, because of the need to write data more than once; high cost per megabyte of storage due to the duplication of all data |
RAID 2 | not used |
RAID 3 | not used |
RAID 4 | Striping, parity, dedicated parity disk | Fault tolerance without the high cost of completely duplicating all data | Parity disk can become a performance bottleneck; for this reason it is almost never used over RAID 5 |
RAID 5 | Striping, parity | Fault tolerance without the high cost of completely duplicating all data | |
The following
series of images illustrates the various methods RAID uses to store data.
RAID level descriptions provided are generally still valid for Red Hat Linux and similar Linux distributions. RAID levels and their associated concepts (like striping, mirroring, and parity) are well-established standards that haven't fundamentally changed in recent years.
Here's a summary of the key points, including any relevant updates for modern systems:
RAID Level Overview
- RAID 0 (Striping): High performance, no redundancy.
- RAID 1 (Mirroring): High reliability, reduced usable capacity.
- RAID 4: Rarely used due to write bottlenecks caused by dedicated parity disks.
- RAID 5: Common for balancing performance and redundancy; requires at least 3 disks.
- RAID 6: Greater fault tolerance than RAID 5 (survives two disk failures), at the cost of additional parity calculations.
- RAID 10 (1+0): Combines the advantages of RAID 0 (performance) and RAID 1 (redundancy); requires at least 4 disks.
Specific Considerations for Modern Red Hat Systems:
-
RAID Management
- Software RAID: Managed using the
mdadm
tool, which remains the primary utility for configuring and managing software RAID arrays in Red Hat Enterprise Linux (RHEL).
- Hardware RAID: Managed through vendor-specific firmware or utilities.
-
Performance and Redundancy
- RAID levels like 4 are still considered obsolete because the write bottleneck caused by the parity drive has been effectively addressed by RAID 5 and 6.
- RAID 10 remains a popular choice for environments requiring high performance and fault tolerance.
-
Red Hat Anaconda Installer
- Anaconda supports the creation of common RAID levels during installation, including 0, 1, 5, and 6.
- RAID 10 and other complex configurations must typically be set up post-installation using
mdadm
.
-
Modern Disk Sizes and SSDs
- The considerations about matching disk sizes still apply, particularly for RAID 0, 5, and 6. SSDs and advanced file systems (e.g., Btrfs, ZFS) may also influence RAID adoption.
- For SSD-based RAID, redundancy-focused levels like RAID 1 or RAID 10 are recommended to protect against SSD failure.
-
CPU Impact
- Modern CPUs can handle parity calculations for RAID 5 and RAID 6 more efficiently than before, reducing the performance impact on software RAID configurations.
-
Redundancy and Fault Tolerance
- RAID 6 is increasingly favored in large arrays due to the risk of dual-disk failures during rebuilds.
Practical Notes:
- Always ensure that your RAID configuration aligns with the workload and performance requirements.
- For critical systems, consider using enterprise-grade hardware RAID controllers with battery-backed write cache or using file systems with built-in redundancy features.
- Monitor RAID arrays proactively to detect and resolve issues before they escalate.
These descriptions and considerations remain accurate for modern versions of Red Hat Linux, including RHEL 9.
The next lesson compares and contrasts hardware and software RAID.