RAID 1

linear + mirror

On this page

Derived by hand from the Linux md rule — how the pages are sourced

Every disk holds a full copy of the data, written in step. A read is served by any one copy, a write goes to all of them, and the array survives as long as one copy is left. It keeps one disk's worth of space however many disks it has, and it is the simplest redundancy there is.

What it is

RAID 1 is the pair linear + mirror: nothing is cut into chunks, and every member holds the whole (mirroring). It is the first level of the 1988 paper, "the most expensive option we consider since all disks are duplicated", and every other level is a cheaper answer to the same problem. There is no layout to choose and no chunk size, because there is nothing to place: mdadm does not accept a chunk size for it.

Advantages

  • Fault tolerance. The highest per disk of any level: with n copies, n − 1 failures (fault tolerance). The number the level is quoted with, one, is the two-disk case; a three-way mirror survives two, and Windows Storage Spaces offers both, as two-way and three-way mirror spaces.
  • Read throughput. One read is served by one disk, at that disk's speed; n readers at once can each be served by a different copy, because the engine spreads requests over the members (performance). A mirror serves more readers; it does not serve one reader faster.

Disadvantages

  • Capacity. One disk's worth, whatever the count (capacity): two disks keep half, three a third.
  • Write cost. Every write is written n times, at the speed of the slowest copy (write penalty). There is no parity to compute and no read-before-write, so a mirror's small writes still cost less than a parity array's.

Consequences

Two things follow from "every member holds the whole". A mirror of mirrors is just a mirror with more copies, which is why a nested level whose spans have shrunk to two-disk mirrors is recognized as one wide RAID 1. And a RAID 5 on two disks is a RAID 1: with one data block per stripe the parity is that block. The Linux kernel uses this to grow a mirror into a RAID 5: it first relabels the two-disk RAID 1 as a two-disk RAID 5, moving nothing because the two layouts are identical on two disks, and only then adds disks. The rebuild is the simplest of any level, a copy from the surviving member; and, like every redundancy, it copies a deletion as faithfully as anything else (RAID is not a backup).

Segmentation

Definition

How an array splits its data across its member disks. Striped cuts the data into fixed-size chunks and deals them out to every member in turn; linear writes it as one run, filling the first member before touching the next. Segmentation is about how many disks take part in one request, not about whether the data survives a failure.

Read more — Segmentation

How RAID 1 places its data

The grid below is the placement of a RAID 1 array of 2 disks, as the Linux md rule produces it. Each column is one disk, each row is one stripe, and each cell names the block that lands there: D followed by a number for a data chunk, and the same number with a prime mark (D0, D0') for the copy of that chunk. Reading a row from left to right shows how one stripe is dealt across the members; reading a column from top to bottom shows what one disk ends up holding.

RAID 1 · 2 disks

          disk 0  disk 1
stripe 0      D0     D0'
stripe 1      D1     D1'
stripe 2      D2     D2'
stripe 3      D3     D3'

Redundancy

Definition

How an array keeps its data readable when a member fails: by storing more than the data itself. Two techniques do it. Mirroring keeps whole copies on separate disks; parity keeps a computed summary from which any one missing block, or two with a second parity, can be rebuilt. Redundancy always costs capacity; the question is how much, and how many failures it covers.

Read more — Redundancy

The numbers for RAID 1

Three quantities follow from the redundancy alone: usable capacity, fault tolerance and write penalty. Below they are worked out for the example array, 2 disks of 2 TB each. Each block states the general rule on its first line, then substitutes the numbers of the example on the lines that follow.

disk size, one copy's worth
N = 2 disks of 2 TB → 2 TB usable, whatever N is

the members an adversary must kill, minus one
mirror: every copy must die → 2 → tolerance 1

one logical write costs
every copy is written → 2 I/Os, random or sequential

Algorithm

Definition

The rule that says, stripe by stripe, which member holds the parity and where the data starts, or where a mirror's copies go. The level says what is stored; the algorithm says where. Left-symmetric for the parity levels and near for RAID 10 are the defaults nearly everything uses. The choice changes speed and compatibility, not capacity or safety.

Read more — Placement algorithm

The placement algorithms RAID 1 accepts

A placement algorithm decides where the parity blocks or the copies go within each stripe. RAID 1 has none to choose from: a plain mirror has no layout to choose — every member holds a full copy.

RAID engine

Definition

The component that turns a RAID layout into disk operations. It owns the array's metadata, translates every request from the array's addresses to the members', writes the copies or computes the parity, and keeps serving when a disk fails. It is a role, not a fixed device: a RAID-on-Chip on a controller card, the operating system's own driver, or a boot firmware working with that driver.

Read more — RAID engine

The components that can be the RAID engine of RAID 1

In any given system, exactly one component holds the role of RAID engine: a hardware controller with its own processor, a firmware chip that keeps the metadata while the operating system's driver does the work, or the operating system alone. They are alternatives, not layers, so a system has one of them and not the others. The list below names the components that can hold that role for a RAID 1 array, and what each of them does with the level.

RAID Engine (RoC)
A dedicated PCIe card that includes BOTH the HBA (protocol translation) AND a RAID-on-Chip (RoC) processor. The RoC computes parity, manages the stripe, and exposes one or more Virtual Drives to the OS — the OS never sees the individual physical disks. Examples: Broadcom MegaRAID, Adaptec SmartRAID.
RAID Engine (RoC, tri-mode)
A RAID-on-Chip controller whose ports speak SAS, SATA and NVMe alike (Broadcom MegaRAID 9500/9600 "tri-mode", Adaptec SmartRAID 3200). NVMe drives plug straight into it — no HBA, no SAS/SATA backplane in between — and it still builds the array itself and exposes one virtual drive to the OS. It is the one way hardware RAID over NVMe exists.
RAID Engine (metadata)
A dedicated chip placed between the HBA and the CPU (on the motherboard or near it) that owns the RAID metadata and boot firmware — no compute silicon of its own. The OS still sees individual disks (unlike hardware RAID) but uses a driver to participate in RAID operations; the actual parity computation runs on the CPU. The canonical example is Intel RST (Rapid Storage Technology) on Intel chipsets. Also known as "motherboard RAID", "BIOS RAID", or, once its wiring reveals what it is, "fake RAID".
OS — Linux
Linux operating system managing the RAID array in software. Uses mdadm (for traditional RAID 0/1/5/6/10) or ZFS (with integrated volume management and checksums). The CPU computes all parity; no dedicated hardware required.
OS — Windows
Windows operating system managing RAID in software via Storage Spaces (Windows 8+/Server 2012+) or legacy Disk Management (dynamic volumes). Storage Spaces supports mirroring, striping, and parity spaces with optional journaling for crash consistency.

What happens with fewer disks than the minimum

RAID 1 has nothing below its minimum of 2 disks: an array of one member is that member, so two disks is the smallest array of any kind and no RAID level exists on one disk.

In practice

Strengths

  • Simplest form of redundancy
  • Reads can be served from any member (potential read speedup)
  • Survives N−1 disk failures (n-way mirror)

Limitations

  • 1/N usable capacity (50% for 2 disks)
  • Writes go to every disk simultaneously — write throughput limited by slowest disk

Use cases

  • Operating system drives
  • Small databases needing high availability
  • Any data too critical to lose

Not suited for

  • Large storage pools (high capacity overhead)
  • High-throughput write workloads

Try it

Open this example in the sandbox

A desktop link: on a phone or in a narrow window the sandbox is not offered.

See also

Related

Often confused with