Skip to main content
RunBook Academy

LinuxXVII · Software RAIDRAID levels

RAID10 - mirrored stripes for performance and redundancy

Intermediate⏱ ~8 minbashmdadmlsblkmount

What you'll learn

  • Explain how RAID10 combines striping and mirroring
  • Choose between the RAID10 near, far and offset layouts
  • Create a RAID10 array with mdadm
  • Recognise when RAID10 is the right choice

Prerequisites

Verified against Ubuntu 24.04 LTS · Debian 12 (Bookworm) · RHEL 9.x · Rocky Linux 9.x · AlmaLinux 9.x · Linux kernel 6.1 LTS / 6.6 LTS · systemd 255+ · OpenSSH 8.7p1 (RHEL 9) / 9.6p1 (Ubuntu 24.04) · nftables 1.0.x · chrony 4.x · Pacemaker 2.1.x · Corosync 3.1.x · 2026-08-09

Not yet marked complete on this device.

RAID10 is the standard choice for high-IOPS production workloads. It combines the parallelism of striping with the redundancy of mirroring. The trade-off is that half the raw capacity holds mirror copies.

RAID10 has no parity. That is not a vocabulary quibble: it is what determines the write behaviour. Parity levels must read the old data and old parity before every partial-stripe write and recompute — the read-modify-write penalty — and they have a write hole, the window in which data and parity can be left inconsistent by a crash. RAID10 writes the same block twice and that is all. No read-modify-write, no write hole, and a rebuild that copies one surviving mirror partner instead of recomputing from every remaining member.

How RAID10 works

md RAID10 has three sub-layouts. All of them keep the same number of copies (two, normally) and the same fault tolerance; what differs is where the second copy is placed, and that changes the performance profile.

LayoutWhere the copies sitWhen to use
n2 (near, default)Copies sit on adjacent devices, at the same offsetGeneral purpose; lowest write latency
f2 (far)The second copy lives in a distant region of the devicesSequential read throughput approaching RAID0, because md can spread a sequential read across all members; the cost is more seeking on writes. Same fault tolerance as n2
o2 (offset)Copies are offset by one device on the following stripeA compromise between near and far

man 4 md describes far as making sequential reads “similar to RAID0 in terms of speed”, with “more seeking for writes, making them substantially slower”. It buys you read bandwidth, not extra redundancy — a two-copy RAID10 survives the loss of one device from each mirror pair regardless of layout.

Data-loss riskcreate RAID10
$ mdadm --create /dev/md0 --level=10 --layout=n2 --raid-devices=4 /dev/sdb /dev/sdc /dev/sdd /dev/sde
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.

When to use RAID10

Use RAID10 for:

  • High-IOPS databases (OLTP, write-heavy with many random reads).
  • Write-heavy workloads where RAID5/6 rebuild performance is insufficient.
  • Workloads where the capacity cost (half) is acceptable.
  • Arrays built from very large (8 TB and above) disks, where rebuild risk is the dominant concern.

Do not use RAID10 for:

  • Cold storage where capacity matters more than performance.
  • Situations where usable capacity per pound matters more than rebuild risk and write performance. RAID6 gives you (N-2) capacity instead of N/2 - but understand what you are buying it with.
Read-only / SafeRAID10 mdstat
$ cat /proc/mdstat
Personalities : [raid1] [raid10] [raid6] [raid5] [raid4]
md0 : active raid10 sde[3] sdd[2] sdc[1] sdb[0]
2048000 blocks super 1.2 512K chunks 2 near-copies [4/4] [UUUU]

Knowledge check

Knowledge check · 4 questions

  1. Q1. What is the primary advantage of RAID10 over RAID5?

  2. Q2. RAID10 stores parity to provide redundancy.

  3. Q3. Which of the following are correct uses of RAID10? Select all that apply.

  4. Q4. You are specifying storage for a write-heavy OLTP database on twelve 18 TB drives. A colleague argues for RAID6 "because with disks this large a RAID10 rebuild would take too long". What is wrong with that reasoning?

Passing score: 75%. Answers are checked in this browser.