For those who do not know it, RAID is about gathering multiple disks and using them concurrently to improve data performance or resiliency. Whatever the actual number of discs, in use it will be as if you had only one. You can use RAID from two disks and up to several hundred. In addition, there are a lot of different RAID configurations, whether you want to redundant your data, improve performance, or both at the same time, for a server or a personal computer, there is necessarily a level of RAID that suits you .
Software or Hardware
Both solutions do indeed exist. Either you take a dedicated card to which you are going to connect the disks, and it is she who handles all the management of the RAID, or you delegate the management to your OS.
You have the choice, fine, but what decision to take? Each of course has advantages and disadvantages. I’m not going to give you a big comparative table but you list the most decisive factors.
Regarding RAID software, it is easy to set up since a large part of the operating systems integrates it, you just have to configure it, it is not more complex than to partition. You will have fairly good performance in RAID 0 and RAID 1. Finally it is very inexpensive since it costs you nothing more than the Disks! On the other hand, the main problem with RAID software is that, as it is the system that manages it, on the levels of RAID where there is a parity calculation (RAID 5, 6 …) it is the processor that must load Of the calculation and therefore there is a decrease in the performance of the system. So it does not matter if it’s a tower with 6 drives in RAID 5 and a good CPU, but when it comes to a server with a lot of drives, the slowdown can become noticeable.
I think you will have understood, the advantages & disadvantages of hardware RAID are the exact opposite. It’s expensive because you have to buy RAID cards but it does not rely on the resources of the system because the calculations are done by the dedicated card. So if you have a lot of disks to manage it will not be a problem for the system.
In summary, if it is a desktop computer, the question does not arise: software. If it’s a server, it’s a bit more complex. If all your drives are in RAID 0 or RAID 1, do not clutter yourself with hardware. On the other hand, the most common uses are for RAID 10, 50 and 60. Several factors are then taken into account:
- What is the number of discs? If it’s less than a dozen, let the OS handle,
- What is the server load? If the server needs to face peaks, delegate the management of the RAID to a card,
- Will the discs be heavily loaded? If the server mainly works with RAM and the reads / writes are occasional, do not bother with harware.
Although hard drives are very reliable devices, the failure is never very far away and it is inevitable that as you get older, your hard drives end up showing signs of weakness.
Thus, in the first year of operation, a disk has a 3% chance of failing and this proportion necessarily increases with time. With seven disks on a machine, you have a 7% chance of seeing a release in the first year and by the end of the fourth year it is almost certain to experience a failure on one of the peripherals. Hence the usefulness of RAID levels with redundancy.
On the one hand it is advisable to monitor the state of the RAID and the disks, and, on the other hand, to know what to do to restore it (otherwise, it does not serve anything).
PS: RAID does not dispense with backups!
Let’s get into the thick of it ! Let’s see what the different levels of RAID exist and what they match.
Before starting, it is of course possible to configure a RAID with different disks, but it is nevertheless advisable, if not to have the same disk models, to have disks of the same capacity and having rates Of similar transfers.
This one is very simple to conceive. All disks (at least two disks) in your array (your disk array) are combined, called stripping or stripe aggregation.
There are two advantages to this level of RAID: the availability of 100% disk space and performance. Indeed, discs often constitute a bottleneck because transfers are long. In RAID 0, all your data is divided (stripped) and distributed equally on the disks. So, if you send 1GB to store, 500MB will go on disk A and 500MB on disk B, in parallel, so we speed up the transfer speeds. Similarly, when reading, the disks access their portion of the information simultaneously and send it simultaneously to the motherboard. Therefore, if one of the disks fails, you lose all the data!
You need two discs minimum for a raid 0 and the available space is therefore the capacity of the smallest disks in the cluster multiplied by the number of disks.
This type of RAID is also very easy to apprehend. RAID 1 is also known as mirroring because the data set is written simultaneously across all disks. You therefore have no improvement in writing performance, an improvement in reading because several disks are solicited at a time. The advantage is mainly due to a very good fault tolerance, because if you lose a disk, there is always another one that contains the same data. This nevertheless has a cost since you “lose” 50% of your usable disk space.
The usable space is here only the space of a single disk, and if they are not of the same size, the smallest of them.
RAID 5 is a compromise between RAID 0 and RAID 1. This RAID level works like RAID 0 because the data is divided and spread across multiple disks, but there is also a distributed parity. The parity calculation makes it possible to recover all the information in the event of a disk failure.
Thus, if a disk is lost, it is possible to recreate all the information from the remaining data on the n-1 disks and the distributed parities.
The advantage, you will understand, is that you get good performance, without compromising all the data in the event of a disk failure unlike RAID 0. Finally, we take advantage of a tolerance to The loss of a disk, but without limiting usable space to the space of the smallest disk as in RAID 1.
Nevertheless, it is important to note that if a disk is lost, the time required to reconstitute the cluster (time to calculate and write missing data from distributed parities) is not negligible. For a 1TB disk, this can take up to 10 hours. However, the system remains usable during the reconstruction time, even if it is slowing down.
Moreover, the probabilities show that there is a greater chance of losing a second disc as soon as a first one has just let go. Many factors come into play, but there are two obvious ones:
- If the drives have the same number of operating hours and are the same, it is likely that the failures occur after a similar number of hours of use,
- When a disk fails, the remaining disks are heavily loaded to rebuild the array. If one of the remaining discs shows weaknesses, it is possible that this solicitation will make it return the soul.
Finally, the current hard drives have a reading error rate ( ERU ). This means that there may be some data that will be unreadable on the disk. In other words, whatever the cause of this error, the disks will fail to read certain bits.
Manufacturers estimate the error rate. The latter is generally of the order of one error every 10 ^ 14 bits, so of an error every 12.5TB. Some discs for professional use have lower error rates, of the order of 10 ^ 16 bits.
We will apply the following formula where P is the probability of reconstituting the array, N the number of disks and S the size of the array: P = (1-10 -14 ) 8 * 10 9 * N * S .To Make an estimate of the probability of rebuilding your array by using the calculator at the end of the post:
To calculate usable useful space, the formula is quite simple. For N representing the number of discs and S the disc size (or the smallest if they are of different sizes), the usable space corresponds to (N-1) * S :
RAID 6 is an evolution of RAID 5. It works in the same way, but allows to support the loss of two disks thanks to a double parity.
RAID 6 therefore offers greater redundancy to the detriment of storage space, since the equivalent of two disks in storage is “lost”. To this are added two major defects:
- A lower writing speed compared to RAID 5 due to more complex parity calculations,
- A very high rebuilding time of the array in case of failure of two disks.
RAID 6 requires a minimum of four disks and the usable space is (N-2) * S where N is the number of disks and S is the size of disks. Calculate the space with the calculator below:
Combined RAID levels
The combined RAID levels are simply the combination of two simple RAIDs at a time, on two levels. The rating is two-digit; The first indicates the RAID level of the clusters, and the second corresponds to the global cluster level.
The clusters are therefore in RAID 0 and these are then mirroring. This requires a minimum of four discs. This gives good performance and a high redundancy, but the space / redundancy ratio and hence price / redundancy is very high. This level of RAID is therefore little used.
To calculate the usable space, the formula corresponds to N * S where N is the number of discs per cluster and S is the capacity of the discs.
Its reliability is relatively low since the failure of a disk causes the whole cluster to fail. Therefore, two faulty disks: one in cluster A and one in cluster B render the entire system inoperative.
The main advantage is that it can easily have physical snapshots: in a system with three or more clusters, removing a complete cluster allows a snapshot of the system at time t.
This level is the reverse of the previous one. We proceed from the outset to the mirroring and then to the stripping. Like the RAID 01, it requires four discs at the minimum. The advantage is that you must have a defect on all the elements of a cluster to defeat the RAID as a whole. Moreover, the reconstruction is fairly rapid. However, at least 50% of the storage space is lost. Since the capacity calculation for RAID 10 is G * S where G is the cluster number and S is the capacity of a disk.
Although similar to RAID 01, RAID 10 is therefore much more reliable.
This level of RAID, just like its older RAID 5 is very used because it presents a good compromise performance / space / reliability. The clusters are therefore clusters in RAID 5 and these are then stripped in RAID 0.
This level of RAID allows to play on the redundancy rate and space. Indeed, we have seen that a RAID 5 requires a minimum of three disks and allows the loss of a disk by monopolizing the equivalent of the space of a disk for redundancy calculations.
This means that on a cluster it is possible to put more than three disks. With twelve discs, for example, one can imagine to constitute four clusters of three discs, or three clusters of four discs. In the first case, disk space per cluster is required for parity, which is four times the capacity of a disk; In the second case, only the equivalent of three discs is “lost”. However, the first system allows the loss of up to four disks (one per cluster), while the second can lose only three.
In addition, the greater the number of disks per cluster, the greater the probability of losing two disks in the same cluster. Finally, as explained for RAID 5, the more a cluster is large in disk space, the lower the probability of reconstructing the array …
We must also consider the performance aspect. Since each cluster consists of one RAID 0 element, the more clusters, the greater the parallelization for data write reads. The system will therefore gain in rapidity … What compromise is not it?
The calculation of the space therefore depends on RAID 5 the number of disks per cluster. The formula is (NG) * S where N is the total number of disks, G is the number of clusters, and S is the capacity of the disks. Estimate the useful space of your RAID 50:
The RAID 60 is very similar to the RAID 50. It works in the same way except that the clusters are in RAID 6 instead of being RAID 5. It therefore allows the loss of more drives with greater redundancy, But less good performance and less space.
It requires a minimum of eight disks and the formula for calculating usable space is (N-2 * G) * S :
So we went through the most common RAID levels and what they involved. All you have to do is make a choice according to your use. Note that it is even possible to put this in place in some laptops!
And what is your experience with RAID? Problems encountered, data saved?