A Complete Overview of RAID on GNU/Linux
Executive Summary
RAID (Redundant Array of Independent Disks) on GNU/Linux provides data redundancy and performance benefits through two main approaches: Hardware RAID and Software RAID. 💾
Hardware RAID relies on a dedicated controller card, configured via the system's BIOS or UEFI. This setup presents a single storage device to the operating system and is managed using vendor-specific utilities.
Software RAID provides greater flexibility and is available in several forms. The most traditional implementation is the kernel's mdadm subsystem, which creates virtual RAID devices like `/dev/mdX`. It's managed with the `mdadm` utility and supports a comprehensive set of standard levels, including RAID 0, 1, 5, 6, and 10.
Modern alternatives integrate RAID directly into other storage layers. Filesystem-based solutions, such as Btrfs and ZFS, combine volume management with RAID functionality. Btrfs offers built-in support for RAID 0, 1, and 10, while ZFS provides highly resilient options like Mirror and its RAID-Z variants. Additionally, the Logical Volume Manager (LVM) incorporates RAID capabilities, allowing users to create RAID logical volumes on top of a flexible storage pool, supporting most common RAID levels.
Keywords: RAID, GNU/Linux, Software RAID, Hardware RAID, mdadm, Btrfs, ZFS, OpenZFS, LVM, Storage, Data Redundancy, Mirroring, Striping, Parity, Filesystem, Volume Manager, Controller Card
```
Abbreviations
├─ BIOS: Basic Input/Output System
├─ Btrfs: B-tree File System
├─ GNU:  GNU's Not Unix!
├─ LV:  Logical Volume
├─ LVM:  Logical Volume Manager
├─ OS:  Operating System
├─ PV:  Physical Volume
├─ RAID: Redundant Array of Independent Disks
├─ UEFI: Unified Extensible Firmware Interface
├─ VG:  Volume Group
└─ ZFS:  Zettabyte File System
```
```
A Complete Overview of RAID on GNU/Linux
└─ RAID (Redundant Array of Independent Disks)
  ├─ Hardware RAID
  │  ├─ Dedicated Controller Card (e.g., Broadcom/LSI, Microchip/Adaptec)
  │  ├─ Configuration via BIOS/UEFI utility
  │  ├─ Presents a single block device to OS (e.g., /dev/sda)
  │  └─ Management tools (e.g., storcli, megacli)
  │
  └─ Software RAID
   ├─ Kernel Subsystem (mdadm)
   │  ├─ The "classic" Linux software RAID
   │  ├─ Managed with `mdadm` utility
   │  ├─ Creates virtual `/dev/mdX` devices
   │  └─ Levels Supported
   │   ├─ Linear
   │   ├─ RAID-0 (Stripe)
   │   ├─ RAID-1 (Mirror)
   │   ├─ RAID-4/5 (Parity)
   │   ├─ RAID-6 (Dual Parity)
   │   └─ RAID-10 (Stripe of Mirrors)
   │
   ├─ Filesystem-Integrated
   │  ├─ Btrfs
   │  │  ├─ Integrated volume management
   │  │  └─ RAID Levels: 0, 1, 10, 5/6 (unstable)
   │  └─ ZFS (OpenZFS)
   │   ├─ Integrated volume manager & filesystem
   │   ├─ Pools (zpool) and vdevs
   │   └─ RAID Levels: Mirror, RAID-Z1/2/3, dRAID
   │
   └─ Logical Volume Manager (LVM)
     ├─ RAID functionality within LVM2
     ├─ Layers: PVs -> VGs -> RAID LVs
     └─ RAID Levels: 0, 1, 4, 5, 6, 10
```