RAID, in plain language
RAID means Redundant Array of Independent Disks. Linux treats several physical drives as one logical disk. Some RAID levels copy data for safety. Some stripe data for speed. RAID is not a backup.
Why dedicated servers use RAID
Hetzner often ships two same-size SSDs or NVMe drives. If you install the OS on only one disk, a single failure takes the server down. RAID1 writes the same data to both disks. One disk can die and the website stays up until you replace the drive.
rm -rf, or a bad installimage. Keep backups somewhere else (storage box, object storage, another machine).The levels you will actually see
RAID 0 · stripe
Data is split across disks for speed and full capacity.
2×1 TB → 2 TB · one disk dies = all data gone
RAID 1 · mirror
Two (or more) copies. Hetzner default for two OS disks.
2×1 TB → 1 TB · one disk may fail
RAID 5 · parity
Needs 3+ disks. Capacity of N−1. Heavier writes.
3×1 TB → 2 TB · one disk may fail
RAID 6 · dual parity
Needs 4+ disks. Two disks may fail. Common on many-drive boxes.
4×1 TB → 2 TB · two disks may fail
RAID 10 · mirror + stripe
Best mix of speed and safety. Needs 4 disks (or more, even count).
4×1 TB → 2 TB · one disk per mirror may fail
/boot stays RAID1
Even if data is RAID 0 or 10, Hetzner keeps /boot as RAID1 so GRUB can boot.
md0 = boot mirror
installimage can build software RAID 0, 1, 5, 6, or 10. For two disks, use RAID1 unless you fully accept RAID0 data loss.
Software RAID vs hardware RAID
| Software RAID (mdadm) | Hardware RAID | |
|---|---|---|
| Who does the work | Linux CPU, tiny cost on modern hardware | A RAID card in the server |
| You see | /dev/md0, md1, md2 | One fake disk, e.g. /dev/sda |
| Hetzner | Usual on auction / two-disk servers | Set up the array before installimage |
| Rescue | Linux can assemble the array | The card presents the volume already |
Read RAID status
cat /proc/mdstatlsblkmdadm --detail /dev/md2In /proc/mdstat, [UU] means both disks are up. [_U] or [U_] means a disk is missing. A progress bar is a resync after create or rebuild — wait for it.
/proc = process filesystem (live kernel data). md = Multiple Device (software RAID). stat = status. Full list of short names: Abbreviations.
# Personalities : [raid1]# md2 : active raid1 nvme0n1p3[0] nvme1n1p3[1]# 468713472 blocks super 1.2 [2/2] [UU]Create a data array (extra disks)
Only do this for spare drives that are not already in the OS array. Creating RAID wipes those devices.
mdadm --create --verbose /dev/md3 --level=1 --raid-devices=2 /dev/sdc /dev/sddmkfs.ext4 /dev/md3mkdir -p /datamount /dev/md3 /dataPersist the mount in /etc/fstab using the UUID from blkid /dev/md3.
Email when a disk fails
On Debian and Ubuntu, set a mail address in /etc/mdadm/mdadm.conf and keep AUTOCHECK=true in /etc/default/mdadm. You need a working mail stack for this to leave the server.
mdadm --monitor --test --oneshot /dev/md0Stop RAID in Rescue before a clean install
mdadm --stop /dev/md0mdadm --stop /dev/md1mdadm --stop /dev/md2mdadm --stop /dev/md*