RAID 0 vs RAID 1

RAID 0 vs RAID 1 #

RAID (redundant array of independent disks) is a storage technology that combines multiple disk drive components into a single logical unit so it behaves as one drive when connected to any other hardware. RAID 1 offers redundancy through mirroring, i.e., data is written identically to two drives. RAID 0 offers no redundancy and instead uses striping, i.e., data is split across all the drives. This means RAID 0 offers no fault tolerance; if any of the constituent drives fails, the RAID unit fails.

Comparison Chart #

Key Feature Striping Mirroring
Striping Yes; data is striped (or split) evenly across all disks in the RAID 0 setup. No; data is fully stored on each disk.
Mirroring, Redundancy and Fault Tolerance No Yes
Performance In theory RAID 0 offers faster read and write speeds compared with RAID 1. RAID 1 offers slower write speeds but could offer the same read performance as RAID 0 if the RAID controller uses multiplexing to read data from disks.
Applications Where data reliability is less of a concern and speed is important. Where data loss is unacceptable, e.g. Data archival
Minimum number of physical disks required 2 2
Parity disk? Not used Not used
Advantages Speed: very fast reads and writes; no overhead for parity calculation. 100% disk utilization. Great performance, even if writes are a little slower compared with RAID 0. Fault tolerance with easy recovery (simply copy the contents of one drive to another)
Disadvantages No redundancy or fault tolerance. If one drive in the RAID fails, all data is lost. Storage capacity is effectively cut in half because two copies of all data are stored. Recovering from a failure requires powering down the RAID so data is not accessible during the recovery.


Data Organization in RAID 0 and RAID 1 #

RAID 0 offers striping with no parity or mirroring. Striping means data is “split” evenly across two or more disks. For example, in a two-disk RAID 0 set up, the first, third, fifth (and so on) blocks of data would be written to the first hard disk and the second, fourth, sixth (and so on) blocks would be written to the second hard disk. A downside of this approach is that if even one of the disks crashes, the entire RAID 0 setup fails because data becomes unrecoverable. In technical terms, this is described as a lack of fault tolerance.

raid redundant array of independent disks pic 1
Data Storage in a RAID 1 Setup
raid redundant array of independent disks pic 2
Data Storage in a RAID 0 Setup

A RAID 1 setup is different. There is no striping; the entire data is mirrored on each disk. This results in multiple copies of data (redundancy). And if one of the disk fails, data can still be recovered because it is intact on the second disk (most RAID 1 setups use only 2 disks, though some may use more), which means RAID 1 is fault tolerant.

Here is a good video that explains the difference between RAID 0 and RAID 1 arrays:

For a shorter video by the same person: Click here


Reliability #

RAID 1 offers higher reliability because of redundancy; even if one of the drives fails outright, data is still available on the other. However, RAID arrays do not protect data from bit rot — the gradual decay in storage media that causes random bits on the hard drive to flip, corrupting the data. Modern file systems like ZFS and Btrfs protect against bit rot via per-block checksumming, and should be used be people serious about protecting their data for several years:

It’s a common misconception to think that RAID protects data from corruption since it introduces redundancy. The reality is exactly the opposite: traditional RAID increases the likelihood of data corruption since it introduces more physical devices with more things to go wrong. What RAID does protect you from is data loss due to the instantaneous failure of a drive. But if the drive isn’t so obliging as to just politely die on you and instead starts reading and/or writing bad data, you’re still going to get that bad data. The RAID controller has no way of knowing if the data is bad since parity is written on a per-stripe basis and not a per-block basis. In theory (in practice, parity isn’t always strictly checked on every read), a RAID controller could tell you that the data in a stripe was corrupt, but it would have no way of knowing if the actual corrupt data was on any given drive.


Performance #

Writes #

RAID 0 offers very fast write times because the data is split and written to several disks in parallel. Writes to a RAID 1 unit is slower compared with RAID 0, but about the same as writing to a single disk. This is because the entire data is written to two disks, but in parallel.

Reads #

Reads are also very fast in RAID 0. In ideal scenarios, the transfer speed of the array is the transfer speed of all the disks added together, and limited only by the speed of the RAID controller. Reads from RAID 1 may or may not offer such performance boost, depending upon the RAID controller. “Smart” controllers split the reading task in a way that takes advantage of data redundancy and reads different blocks from different disks. This offers a performance boost similar to RAID 0 but for controllers that are not capable of such multiplexing, read speeds and are about the same as a single hard drive.


Storage capacity #

The total storage available for the RAID 0 unit is simply the sum of the storage capacities of individual disks because there is no redundancy. In case of a RAID 1 array, however, there is replication of data, which means the total storage capacity of the unit is the same as that of one hard disk.


Applications #

RAID 1 is a better choice if reliability is a concern and you want to avoid data loss. A typical example is data archival needs. RAID 0 is a better choice in scenarios where a large volume of high-speed storage is needed. For example, capturing uncompressed HD video over HDSDI and recording it straight to a hard drive requires very fast writes and a large capacity. Another example is large databases that contain logs or other information that has a high volume of read operations.


Combining RAID 0 and RAID 1 #

RAID levels 0 and 1 can be combined to make a stripe of mirrors — RAID 10 — or a mirror of stripes (RAID 01) configuration. These are called nested RAID levels.

RAID 01 Nested Configuration
RAID 10 Configuration

RAID 10 is more fault tolerant than RAID 01 so it is widely used; RAID 01 is almost never used because RAID 10 is superior to it while using the same number of disks.


Credits: Diffen

You Might Also Interested: Ethernet Cables – RJ45/Colors & Crossover

Powered by BetterDocs