What Is RAID?
How RAID Combines Several Disks
What is RAID? RAID, short for Redundant Array of Independent Disks, is a method of combining several physical disks into one logical storage unit. The operating system sees a single disk, while the array spreads data across the drives behind it. Servers use RAID to gain speed, protection against drive failure, or both.
The array is managed either by a dedicated controller card or by the operating system itself. In both cases, almost every RAID layout is built from three building blocks: striping, mirroring and parity.
Each layout is described in RAID levels compared, and the difference between controller and software arrays is covered in hardware vs software RAID.
Striping, Mirroring and Parity Explained
Striping splits data into chunks and writes them across several disks in turn. Reads and writes run in parallel, so throughput rises. However, a single failed disk destroys the data, because no copy exists elsewhere.
Mirroring writes identical copies of the same data to two or more disks. If one disk fails, the other still holds every file, so the server keeps running. The cost is capacity: a two-disk mirror provides the space of one disk.
Parity stores extra information calculated from the data. Parity lets the array rebuild the contents of a failed disk from the surviving disks. It uses less capacity than a full mirror, but every write requires the parity to be recalculated and stored, which adds work.
Why a Database Server Uses an Array
Imagine a database server with one disk. If that disk fails, the site goes offline until the drive is replaced and the data is restored from another copy. The outage could last hours.
The same server with two disks in a mirror keeps running after one drive fails. The administrator replaces the failed disk, and the array rebuilds its copy in the background. Visitors may notice slower responses during the rebuild, but the site stays online.
Frequently asked questions
Does RAID make a server faster?
It can, depending on the level. Striping lets several disks handle reads and writes at the same time, which raises throughput. Mirrors can serve reads from either disk. Parity arrays are usually slower on writes, because parity must be updated each time data changes.
Does a RAID array keep working after a disk fails?
It depends on the design. Mirrored and parity arrays keep serving data after a single disk fails, but they run in a degraded state until the replacement disk is rebuilt. A striped array with no redundancy, such as RAID 0, loses all its data when any one disk fails.