More than simply storing data, storage solutions must provide access to information efficiently, in a timely manner and, depending on the case, offering some kind of protection against failures. This is where RAID (Redundant Array of Independent Disks) systems come into play.
In the next lines, we will explain what RAID is and show its main levels.
What is RAID?
As already mentioned on Abbreviation Finder, RAID stands for Redundant Array of Independent Disks. It is basically a computational solution that combines several hard drives (HDs) to form a single logical data storage unit.
And what is logical unit? In a nutshell, when it comes to RAID, it’s about making the operating system see the set of hard drives as a single storage unit, regardless of the number of devices in use. Today, in addition to hard drives, it is possible to mount SSD- based RAID systems.
Making multiple storage units work together results in many possibilities:
– If a hard drive is damaged, the data on it will not be lost, as it can be replicated on another unit ( redundancy);
– It is possible to increase the storage capacity at any time with the addition of more hard drives;
– Access to information can become faster, as data is distributed to all disks;
– Depending on the case, there is greater fault tolerance, as the system is not stopped if a unit stops working;
– A RAID system can be cheaper than a more sophisticated storage device and, at the same time, offer practically the same results.
For a RAID system to be created, it is necessary to use at least two hard drives (or SSDs). But that’s not all: it is also necessary to define the system’s RAID level. Each level has different characteristics precisely to meet the most varied needs. The following are the most common levels:
RAID 0 (zero)
Also known as striping, the RAID 0 level is where the data is divided into small segments and distributed among the disks. It is a level that does not offer protection against failures, since there is no redundancy. This means that a failure in any of the disks can cause loss of information for the entire system, especially since “pieces” of the same file can be stored on different disks.
The focus of RAID 0 ends up being performance, since the system practically adds the data transmission speed of each unit. So, at least theoretically, the more disks in the system, the higher the transfer rate. It is not difficult to understand why: as the data is divided, each part of a file is recorded in different units at the same time. If this process happened only on a single HD, the recording would be a little slower, since it would have to be done sequentially.
Because of these characteristics, RAID 0 is widely used in applications that deal with large volumes of data and cannot be slow, such as image processing and video editing.
The RAID 1 is probably the best known model. In it, one unit “duplicates” the other, that is, makes a “copy” of the first, which is why the level is also known as mirroring. With this, if the primary disk fails, the data can be recovered immediately because there are copies on the other.
Note that, due to this characteristic, RAID 1 systems must work in pairs, so that a unit always has a “clone”. In practice, this means that a RAID system composed of two hard drives with 500 GB each will have exactly this capacity, instead of 1 TB.
The RAID 1 level is clearly focused on data protection, that is, it does not make access faster. In fact, there may even be a slight loss of performance, since the recording process ends up having to happen twice, once on each unit.
It is important to note, however, that the use of RAID 1 does not dispense with backup solutions. As the data is duplicated practically in real time, it means that if improper information is recorded on the first drive (such as a virus) or if an important file is deleted by mistake, the same will happen on the second disk. For this reason, RAID 1 is more suitable to protect the system from “physical” drive failures.
RAID 0 + 1 and RAID 10
As you might have guessed, the RAID 0 + 1 level is a “hybrid RAID” system, that is, it combines RAID 0 with RAID 1. For this, the system must have at least four storage units, two for each level. Thus, there is a RAID solution that considers both the performance and redundancy aspects.
There is a variation called RAID 10 (or RAID 1 + 0) of similar operation. The essential difference is that, in RAID 0 + 1, the system changes to RAID 0 in case of failure; in RAID 1 + 0, the system assumes RAID 1 level.
The RAID 5 is another level well known. In it, the aspect of redundancy is also considered, but in a different way: instead of having an entire storage unit as a replica, the disks themselves serve as protection. In this way, you can even assemble the system with an odd number of units. But, how is this possible? Using a parity scheme.
In this method of protection, the data is divided into small blocks. Each of them receives an additional bit – the parity bit – according to the following rule: if the number of bits ‘1’ in the block is even, its parity bit is ‘0’; if the number of bits ‘1’ is odd, the parity bit is ‘1’.
Parity information – as well as the data itself – is distributed across all disks in the system. As a rule, the space allocated for parity is equivalent to the size of one of the disks. Thus, an array made up of three 500 GB hard drives will have 1 TB for storage and 500 GB for parity.
From there, if in a verification task the system finds, for example, that the parity bit of a block is ‘1’, but there is an even number of bits there, it realizes that there is an error. If there is only one bit with a problem and if the system can identify it, it will be able to replace it immediately. Data restoration can be done even after the hard drive has been changed.
As an example, imagine a data block with bits ‘110X’ and parity ‘1’. The X indicates a missing bit, but is it ‘0’ or ‘1’? Since the parity is ‘1’, it means that the block is made up of an odd number of bits ‘1’. Therefore, if X were ‘0’, the parity should also be ‘0’, because there would be even number of bits ‘1’ there. This means that bit X can only be ‘1’.
During the replacement, it is possible to keep the system running, mainly with the use of equipment that supports hot-swaping, that is, the replacement of components without the need to shut down the computer. This is possible because the data is distributed across all disks. In case one fails, the parity scheme allows to recover the data from the information existing in the other units.
RAID 5 is a very interesting option for systems that need to combine redundancy with (relatively) low costs, but it has a considerable limitation: it can protect the system if only one disk fails.
One way to deal with this is to add a feature called hot-spare to the system. It is a scheme in which one or more disks are added to reserve, taking action as soon as a drive has problems.
Another interesting alternative is the use of RAID 6. This is a newer specification, similar to RAID 5, but with an important difference: it works with two parity bits. With this, it is possible to offer redundancy for up to two hard drives in the system, instead of just one.
RAID 2, 3 and 4
The RAID levels shown so far are the most used, but there are some lesser known ones, among them, RAID 2, RAID 3 and RAID 4:
RAID is a type of storage solution that emerged in the late 1980s. At that time and in the years that followed, hard drives did not have the same standard of reliability as they do today. For this reason, RAID 2 was created. It is, to some extent, similar to RAID 0, but has an ECC ( Error Correcting Code) type of failure detection mechanism. Today, this level is hardly used anymore, since practically all HDs have this feature.
This is a level similar to RAID 5 in that it uses parity. The main difference is that RAID 3 reserves a storage unit just to store the parity information, which is why at least three disks are required to mount the system. This level can also present greater implementation complexity due to the fact that the data writing and reading operations consider all disks instead of treating them individually.
RAID 4 also uses the parity scheme, having a similar operation to RAID 3, with the difference of dividing data into larger blocks and offering individual access to each disk in the system.
This level may present some performance compromise, since any recording operation requires updating the parity unit. For this reason, its use is more indicated in systems that prioritize the reading of data, that is, that perform much more consultations than recording.
JBOD (Just a Bunch Of Disks)
When it comes to RAID, you can also hear about JBOD, which stands for Just a Bunch Of Disks (something like “Just a Disk Set”). It is not a RAID level, but a method that simply allows the use of two or more hard drives together (regardless of their capacity) in order to make the operating system see the arrangement as a single logical unit.
In fact, JBOD is similar to RAID, but has no focus on performance or redundancy, considering only the increase in storage capacity. Here, the data is simply recorded and, when one disc becomes full, the operation continues on the other. In this way, if one hard drive is damaged, the data on the others is not damaged.
In the past, building RAID systems was not a simple task and its use was usually limited to servers. Today, however, it is possible to implement them even on personal computers, especially since virtually any modern operating system (Windows, Linux, Mac OS X, etc) supports this feature.
The easiest way to do this is to purchase a motherboard that has a RAID controller. In a nutshell, this device, which can work with PATA, SATA or SCSI interfaces, identifies the connected storage units and makes them work as a RAID system. Its configuration is usually done from the BIOS setup, although some control software may be provided to work on the operating system.
If the motherboard does not have a RAID controller, it is possible to add cards that add this function. These devices can usually be found using a PCI or PCI Express interface. The sign below is an example. It is connected to the computer via a PCI Express slot and has four SATA connectors. These are where the hard drives (or SSDs) that will be part of the RAID system should be connected:
A RAID system can also be implemented via software, without the need for controllers. In these cases, the entire management is done from the operating system, therefore, it is necessary to have a good hardware configuration so that the computer is not overloaded.
An important note: on motherboards, it is common to find RAID controllers that actually mix software resources available from the operating system with some features that can be activated via BIOS. In these cases, the performance of the RAID system is often inferior in comparison to what can be offered by a “real” controller.
RAID is not a new invention. It appeared in 1987 at the hands of David Patterson, Garth Gibson Randy Katz, at the time, researchers at the University of Berkeley, in the United States. The question that remains in the air is: is a technology that has existed for so long still useful today? The answer is a resounding YES.
Using RAID today can be much more advantageous than years ago. First, because costs have decreased. In the past it was only possible to make RAID with SCSI drives (more expensive), for example. Currently, RAID controllers are a little cheaper, compatible with several interfaces and relatively simple to implement.
In addition, today there are many more applications that benefit from this type of system. So, even with the emergence of new data storage technologies, we will hear about RAID for a long time.