Here’s how storage systems use the concepts of RAID to protect your data.
In A Case for Redundant Arrays of Inexpensive Disks, Patterson, Gibson and Katz propose five methods for using arrays of slow, unreliable but inexpensive drives to match the performance and reliability of the SLEDs (Single Large Expensive Disks) then dominating the minicomputer and mainframe storage market. They called these five methods RAID levels 1-5 and thereby created “The Five Standard RAID Levels”.
Two additional levels, 0 and 6, have become accepted as “standard” over the years, but no standards body owns the RAID trademark. Therefore, no one can define exactly what RAID3 is and how it must be implemented, so there can be (and sometimes are) large variations from one implementation to another.
Today’s discussion limits the term RAID to protection schemes that have the granularity of a disk drive. This limits these systems to building RAIDsets of drives of similar size and performance. If a RAIDset contains drives of different sizes, only the capacity of the smallest drive will be used on each drive. Any additional capacity on the larger drives will be unused dead space as these systems aren’t smart enough to manage mixed drives. Exactly why should become clear as we look at how each RAID level works.
We’ll talk about combination RAID, chunklets, distributed parity RAID, and erasure coding in a future episode. While I’m toning down the personal history compared to the last installment, this is really traditional RAID.
RAID0 Data Striping
RAID0 describes any method that stripes data across multiple drives. However, RAID0 isn’t included in the original RAID paper because it doesn’t provide any redundancy.
Raid0 Data Layout
Fundamentally a RAID0 system stripes data in strips of some fixed size, typically 4KB-1MB. RAID0 sets can deliver substantial performance as all the members of the set can serve I/O requests simultaneously. It also has very low CPU requirements.
The downside is that a file or dataset larger than the stripe size will be partially stored on multiple drives, so the failure of any drive makes all the data unusable. It is theoretically possible to recover data objects smaller than strip size but since 1/Nth of the file system metadata will be missing as well the loss of any member of a RAID0 set practically means the loss of all the data.
RAID0 with spinning disks was used for temporary scratch space for HPC and applications like video editing, where video was downloaded, edited on the RAID0 set, and posted back to persistent storage.
In the flash memory era, RAID0 has been fading out as single SSDs have grown to tens of terabytes and 100,000s of IOPS.
Some file systems and/or volume managers (the line between them is fading) also allow logical volumes to be built from concatenated devices or partitions. Like RAID0, concatenated volumes let users build logical volumes larger than the available devices without adding redundancy.
As noted earlier, a drive failure in a RAID0 set will almost certainly result in the total loss of all the data on the set. By contrast, in a concatenated volume, data is stored in bigger chunks, so if a drive fails, some portion of the volume’s data can usually be recovered after Herculean effort.
Concatenated volumes provide capacity but since the newest, most frequently accessed data will only be stored on one drive a concatenated volume usually provides the same performance as a single drive.
RAID1 – Mirror, Mirror on the Wall
RAID1 data protection can’t be any simpler: just duplicate all the disk writes for Drive A to Drive B as well.
Note that by the time it got its name; RAID1 wasn’t a radical new idea; it simply put a new name on disk mirroring, a capability that had existed in file systems and operating systems for a few years.
Disk Mirroring or RAID1
RAID1 systems smart enough to distribute read I/Os across both drives in a pair, which would include pretty much every implementation released in the 21st century, are somewhat faster than a single hard drive for workloads that perform a significant number of reads.
A RAID1 system performs one I/O for each read and two I/Os for each write. Because the two drives can act independently for reads, a RAID 1 set can theoretically deliver twice the IOPS of a single drive for reads and the same IOPS as a single drive for writes.
Disk mirroring has two substantial disadvantages. First, unlike RAID0 and the levels above RAID1, RAID1 doesn’t address capacity beyond the capacity of a single drive. Both users and storage system vendors can address this by combining mirroring with striping or concatenating but that’s the
The other downside is the 50% overhead while still only protecting against a single error or failure.
Some systems, including EMC Symmetrix and Veritas Volume Manager, support three-way or triple mirroring, in addition to two-way mirroring. This of course increases resilience, but also increases overhead to a whopping 66.66%.
Early storage systems used triple mirroring to provide snapshots by syncing three copies of the data and then splitting off one copy as the snapshot.
Modern metadata-based snapshots and double parity schemes provide the same level of resilience with much lower overhead, making triple mirroring essentially obsolete.
While two, and three-way mirroring formed the backbone of high performance disk arrays for decades not every application can justify the overhead of multiple copies. Next time we’ll look at RAID schemes that use math, or for my commonwealth readers maths, to reduce the overhead of data protection.