Safekipedia

Standard RAID levels

Adapted from Wikipedia · Discoverer experience

In computer storage, the standard RAID levels are a set of common ways to organize groups of hard disk drives (HDDs) to store data safely and efficiently. These configurations use methods like striping, mirroring, or parity to combine several disks into one large, reliable storage space. The most common types are RAID 0, which spreads data across disks for speed; RAID 1, which makes exact copies of data on two disks for safety; RAID 5, which uses a special calculation called parity to protect data; and RAID 6, which adds an extra layer of protection.

These RAID levels can also be combined in different ways, such as RAID 10, where mirrored pairs are striped together, or RAID 01, where striped sets are mirrored. The Storage Networking Industry Association (SNIA) has created a standard called the Common RAID Disk Drive Format (DDF) to make sure these RAID setups work consistently.

Although RAID can help protect data from some types of disk problems, it does not guard against major disasters like fires or floods, nor does it prevent mistakes made by users, software issues, or attacks by harmful programs like malware. For truly important data, RAID is just one part of a full plan to keep information safe, and it cannot take the place of regular backup copies.

RAID 0

See also: Non-RAID drive architectures § JBOD

RAID 0 (also known as a stripe set or striped volume) splits ("stripes") data evenly across two or more disks, without parity information, extra copies, or fault tolerance. Because RAID 0 does not have extra copies of the data, if one drive stops working, all the data is lost. This setup is mainly used when speed is more important than keeping the data safe.

A RAID 0 setup can use disks of different sizes, but the amount of space you get is based on the smallest disk. For example, if you combine a 120 GB disk with a 320 GB disk, you will only get 240 GB of storage space (120 GB × 2). However, some systems might let you use the extra space for other things.

A RAID 0 setup with n drives can make data read and write speeds up to n times faster than a single drive, but it does not keep extra copies of the data. Because of this, RAID 0 is used in situations where speed is very important and it is okay if the data is lost, such as in scientific computing or gaming.

RAID 1

See also: Non-standard RAID levels § RAID 1E

RAID 1 is a way to keep data safe by making an exact copy, called a mirror, of your information on two or more disks. The classic setup uses two disks. This method doesn’t try to spread out the data or add extra space; instead, it copies everything exactly onto each disk. Because of this, the total storage you can use is only as much as the smallest disk in the group.

This setup is great when you want your data to be safe and easy to read quickly, even if it means it might take longer to save new information. As long as at least one disk is working, you can still access your data.

When you read information, any disk in the group can help, so reading can be very fast. However, saving new information can only be as fast as the slowest disk in the group. Tests sometimes show that using many disks together can make reading faster than using just one disk, but sometimes it doesn’t make much of a difference.

RAID 2

RAID 2 splits data at the bit level across multiple disks, unlike most RAID levels that divide data into blocks. It uses a special error correction method called Hamming code to find and fix mistakes in stored data. The hard drives are made to spin together so they reach the same spot at the same time. Because of this, the system can usually only handle one read or write request at once.

In the early days of computing, RAID 2 could send data very quickly by using a special Hamming code and many disks working together. It was used in special systems like the Thinking Machines' DataVault and IBM's Stretch system. But today, because modern hard drives already have their own ways to fix errors, RAID 2 is not used much anymore.

RAID 3

RAID 3 is a way to store data using several disks together. It uses a special method called byte-level striping and has one disk that helps protect the data (called a parity disk). Because of how it works, this setup can only handle one request at a time, which can slow things down.

This type of setup works best for tasks that need to read or write large amounts of data in order, like editing videos without compression. However, it does not work well for tasks that need to read or write small pieces of data from random places on the disk. RAID 3 was mostly used with special hardware and big caches to try to fix its performance problems, but it was later replaced by other, better setups like RAID 5.

RAID 4

RAID 4 uses a special way to store data called block-level striping with one disk just for keeping track of information called parity. This setup helps it read data quickly, but writing data can be slower because all the parity information has to go to one disk, unless the system knows how to handle RAID 4 specially.

One good thing about RAID 4 is that you can add more disks to it while it's still working, and it doesn't need to re-calculate the parity information again, as long as the new disks are filled with zeros first.

RAID 5

RAID 5 is a way to store data on multiple disks to keep it safe. It spreads the data and a special kind of backup information called parity across all the disks. This helps protect the data if one disk stops working. To use RAID 5, you need at least three disks.

The way data and parity are arranged can vary. For example, data can be written from left to right or right to left across the disks, and the parity can be placed at the start or end of each data block. These different arrangements affect how the system works but all help in keeping the data safe and balanced across the disks.

RAID 6

RAID 6 is a way to store data safely using multiple disks. It builds on RAID 5 by adding a second parity block. This means it uses striping with two parity blocks spread across all disks, and it needs at least four disks to work.

RAID 6 can keep working even if two disks fail at the same time. This makes it very reliable. Different methods can be used to calculate these parity blocks, and some of these methods are designed to be faster or more efficient.

RAID 6 needs more processing power than RAID 5, especially when writing data. However, reading data can be almost as fast as RAID 5 because it only uses the simpler parity check unless there is a problem. Background checks can help find and fix issues without slowing down regular reading.

Comparison

See also: Nested RAID levels § Comparison

This table shows some important points about standard RAID setups. It tells us how much space we can really use when we combine several disks together. For example, if you have three disks in a RAID 3 setup, you can only use two-thirds of all the space those disks have together.

RAID setups also help us find out if a disk stops working. In the past, disks were not always very reliable, so RAID helped spot problems. Today, most disks can tell us themselves if they’re having trouble, and RAID helps fix the missing information if a disk fails. A disk is considered faulty if it can’t read data properly after trying many times.

LevelDescriptionMinimum number of drivesSpace efficiencyFault toleranceFault isolationArray failure rate
RAID 0Block-level striping without parity or mirroring21 {\displaystyle 1} NoneDrive Firmware Only1 − ( 1 − r ) n {\displaystyle 1-(1-r)^{n}}
RAID 1Mirroring without parity or striping21 n {\displaystyle {\frac {1}{n}}} n − 1 {\displaystyle n-1} drive failuresDrive Firmware or voting if n > 2 {\displaystyle n>2} r n {\displaystyle r^{n}}
RAID 2Bit-level striping with Hamming code for error correction31 − 1 n log 2 ⁡ ( n + 1 ) {\displaystyle 1-{\frac {1}{n}}\log _{2}(n+1)} One drive failureDrive Firmware and Parity1 − ( 1 − r ) n {\displaystyle 1-(1-r)^{n}} − n r ( 1 − r ) n − 1 {\displaystyle {}-nr(1-r)^{n-1}}
RAID 3Byte-level striping with dedicated parity31 − 1 n {\displaystyle 1-{\frac {1}{n}}} One drive failureDrive Firmware and Parity1 − ( 1 − r ) n {\displaystyle 1-(1-r)^{n}} − n r ( 1 − r ) n − 1 {\displaystyle {}-nr(1-r)^{n-1}}
RAID 4Block-level striping with dedicated parity31 − 1 n {\displaystyle 1-{\frac {1}{n}}} One drive failureDrive Firmware and Parity1 − (1 − r)n − n r ( 1 − r ) n − 1 {\displaystyle {}-nr(1-r)^{n-1}}
RAID 5Block-level striping with distributed parity31 − 1 n {\displaystyle 1-{\frac {1}{n}}} One drive failureDrive Firmware and Parity1 − (1 − r)n − n r ( 1 − r ) n − 1 {\displaystyle {}-nr(1-r)^{n-1}}
RAID 6Block-level striping with double distributed parity41 − 2 n {\displaystyle 1-{\frac {2}{n}}} Two drive failuresDrive Firmware and Parity1 − ( 1 − r ) n {\displaystyle 1-(1-r)^{n}} − n r ( 1 − r ) n − 1 {\displaystyle {}-nr(1-r)^{n-1}} − ( n 2 ) r 2 ( 1 − r ) n − 2 {\displaystyle {}-{\tbinom {n}{2}}r^{2}(1-r)^{n-2}}

System implications

When testing different ways to store data using special setups called RAID, it was found that a type of file system called F2FS worked much faster with certain RAID setups. Specifically, F2FS on RAID 0 and RAID 5 with eight SSDs was five times faster than EXT4 on RAID 0 and fifty times faster on RAID 5. The tests also showed that the part of the system that manages the RAID setup can sometimes slow things down when using very fast SSDs.

Nested RAID

Main article: Nested RAID levels

Nested RAID combines two or more standard RAID levels. These combinations are known by names like RAID 0+1, RAID 1+0 (or RAID 10), RAID 5+0 (RAID 50), and others. They mix different methods to create larger and more reliable storage systems.

Non-standard variants

Main articles: Non-standard RAID levels and Non-RAID drive architectures

Besides the common ways to set up storage, there are other options called non-standard RAID levels and non-RAID drive architectures. These include setups like JBOD, which means "just a bunch of disks," SPAN/BIG, and MAID, short for "massive array of idle disks."

Related articles

This article is a child-friendly adaptation of the Wikipedia article on Standard RAID levels, available under CC BY-SA 4.0.