Types of RAID for a NAS: Which One Offers Better Security and Speed

A RAID ( Redundant Array of Independent Disks ) is a group of independent hard drives configured to function as one, either adding their total space to have a greater capacity, improving the speed of reading and / or writing, or configured to double the information from one disc to another and have the assurance that if a disc breaks we will not lose the information. Finally, a RAID could also be configured to generate parity information in order to reconstruct the information in the event of data loss. RAIDs are widely used in NAS servers that we can buy both at home and at a professional level, depending on our needs we can choose between configuring one type of RAID or another.

What is a RAID used for on my NAS server?

Types of RAID for a NAS

NAS servers usually have 2 bays to house hard drives or more, logically they are also compatible with SSD drives, but in essence it is the same, storage disks. The simplest configuration that we can do in our NAS is not to configure any type of RAID, that is, we can configure the disks as “Simple” so that they act completely independently, however, you are missing all the advantages of having a RAID .

If we configure the storage of our NAS with different types of RAID that we are now going to explain to you, we will be able to have greater data integrity , to avoid data loss in case of failure of one or more of the hard drives or SSDs. We will also have fault tolerance , although a hard drive breaks there is no problem because the system can continue to function correctly, although logically it is advisable to change this broken disk or SSD for a new one as soon as possible, to regenerate the information and that the operating system does not check that the RAID is degraded. In case of spending a long time with a broken disk, it is possible that another disk breaks, then we could have data loss, so it is very important to change the broken hard disk as soon as possible. RAIDs also offer us a higher transfer rate , either in data reading, in data writing, or in reading and writing, depending on the type of RAID used we will have some characteristics or others. Finally, a RAID gives us a greater capacity , we can “join” several disks as if it were one, and have all the storage while improving overall performance.

A very important aspect that allows us to make the operating system with RAIDs, is to reserve a hard disk that is in “standby” to activate it just when a hard disk that belongs to the RAID fails, this reserve disk is designed to be used immediately after a failure, in order to reduce the surface of exposure to another catastrophic failure of one more hard disk, and also to return as soon as possible to have the RAID in perfect condition.

When we configure several disks in a RAID, the operating system will see a single logical unit, in NAS servers like QNAP this is called a storage pool, and within a storage pool (of the RAID) we can create the volumes or dataset, depending whether we use EXT4 or ZFS file system. In RAIDs, hard drives or SSDs with the same capacity are generally used, if we do not use the same capacity, it is possible that we are wasting capacity. In all the examples that we will give you later we assume that all the disks have exactly the same capacity.

RAIDs are very common when mounting a server in a company or a home NAS, and there are different types of different RAIDs, each with its own characteristics depending on the purpose we are looking for and the number of disks we are going to use.

Most common RAID types

Currently we have many types of RAID that we can configure on the servers. Depending on the type of RAID, we will need a minimum number of hard drives to function and a maximum number of hard drives, in addition, we will also have different characteristics regarding the number of hard drives that allows them to be broken without data loss, reading speed and writing, and much more. For the theoretical and real capacity examples we will use examples with 4TB capacity hard drives each.

JBOD

JBOD (Just a Bunch of Disks) is not a type of RAID as such, it is usually one of the configurations that appears when configuring hard drives on a server or on a NAS. This type of “RAID” configures the disks so that each one works independently as if they were hard disks individually connected to the computer, the main characteristic is that it will appear in the operating system as if it were a single disk, for Therefore, if we have two 4TB disks in JBOD, we will see that we have an 8TB capacity disk.

JBOD

In JBOD, 100% of the disk of each unit is available, and if one of the hard disks fails, we lose the information stored in it, but not that of the other hard disks. In this type of RAID we have neither data redundancy nor the speed improvements that other types of RAID offer us. Next, you have a summary of the capacity, maximum read and write performance, and the integrity of the data against the failure of one or more disks.

  • Capacity : if we have two hard drives of 4TB each, the capacity of a JBOD will be 8TB in total.
  • Read performance : speed is that of a simple disc, read speed is not improved.
  • Write performance : the speed is that of a simple disk, the writing speed is not improved.
  • Data integrity : a disk crash leads to the loss of information contained only on that disk, and not on the entire JBOD.

As you have seen, in certain circumstances you may be interested in configuring a JBOD, but it is not the most normal thing to have the RAID 0 or RAID 1 that we will see soon.

RAID 0

RAID 0 or also known as “data stripping” is one of the most basic types of RAID, so much so that many users do not even consider it a type as such. In this configuration, all the hard drives function as a single volume, and their total space is the sum of the space of all the hard drives, what is done is that all the data is distributed equally on the two hard drives that are members of the RAID. , there is no parity information of any kind.

Raid 0 Unlike in JBOD, this configuration offers a speed improvement since it writes data simultaneously to the two disks (specifically, twice the speed of reading and writing) but does not offer any fault tolerance; If a hard disk breaks down, we lose all the information on all the disks.

Next, you have a summary of the capacity, maximum read and write performance, and the integrity of the data against the failure of one or more disks.

  • Capacity : if we have two hard drives of 4TB each, the capacity of a RAID 0 will be 8TB in total.
  • Read performance : read speed is twice that of a simple disk, improves x2.
  • Write performance : write speed is twice that of a simple disk, improves x2.
  • Data integrity : A disk crash leads to the loss of all information in the entire RAID.

In the case of using the ZFS file system, the equivalent type of RAID is called STRIPE, in this type of RAID we have exactly the same characteristics as RAID 0, but we can configure more than 2 hard drives in STRIPE, increasing both the capacity and speed of reading and writing, in this case, the failure of a disk causes the loss of all information.

As you have seen, in certain circumstances you may be interested in configuring a RAID 0 or STRIPE, especially if you want to have the best possible performance.

RAID 1

RAID 1 or “data mirroring” is one of the most used types of RAID for those who seek duplication of data to be sure that data is never lost. In this type of RAID, the data is duplicated on the hard drives as if it were a mirror. In this way, although we do not have performance improvement in writing speeds, the reading speed is double, since the data is read at the same time from the two units. In addition, we have absolute security so that, if one of the hard drives fails, the data remains intact in the second and, by replacing the damaged one, the data will be duplicated again.

RAID 1

Unlike in RAID 0, this configuration offers an improvement in the integrity of the data, because if one disk breaks the information will remain safe on the other disk. In addition, we have twice the read speed, but not twice the write speed, it offers fault tolerance.

Next, you have a summary of the capacity, maximum read and write performance, and the integrity of the data against the failure of one or more disks.

  • Capacity : if we have two hard drives of 4TB each, the capacity of a RAID 1 will be 4TB in total.
  • Read performance : read speed is twice that of a simple disk, improves x2.
  • Write performance : write speed is as if it were a simple disk.
  • Data integrity – Crashing a disk does not result in the loss of information from the entire RAID.

In the case of using the ZFS file system, the equivalent type of RAID is called MIRROR, in this type of RAID we have exactly the same characteristics as RAID 1, but we can configure more than 2 hard drives in MIRROR. The capacity will be that of a hard drive, but we will increase the possibility that one or more hard drives will break. Let’s imagine that we have 5 hard drives of 4TB capacity in MIRROR, the capacity is 4TB, but up to 4 of the 5 discs could be broken that the information would remain intact on the remaining disk.

RAID 1 or MIRROR allows us to protect the data, although if you have more than two disks, you may be interested in configuring a RAID 5 or RAID 6 that we will see now.

RAID 5

In RAID 5 , information is distributed across all hard drives, although that space (the size of one of the drives) is reserved for parity. This parity is also distributed among all hard drives. This type of RAID is already more used in business environments than in home environments, although if we have a NAS with 3 or more hard drives we can choose it to have a great gain in reading speed, in addition to, thanks to the parity of the data, to be able to recover all the information if one of the hard drives fails. If two fail, we lose absolutely all the information in the entire RAID.

RAID 5

The total space of a RAID 5 is the space of all the hard drives except 1, that is, if we are going to use 4 hard drives of 4 TB, the total space will be 12 TB. The read speed improvement is also X-1 times the number of discs used. In the example above, for example, it would be 3 times as much.

Next, you have a summary of the capacity, maximum read and write performance, and the integrity of the data against the failure of one or more disks.

  • Capacity : if we have four hard drives of 4TB each, the capacity of a RAID 5 will be 12TB in total. The capacity is X-1 number of disks, if we take into account that all disks are the same.
  • Read performance : read speed is X-1 times the number of disks used.
  • Write performance : write speed is as if it were a simple disk.
  • Data integrity : the failure of a disk does not lead to the loss of information from the entire RAID, if more than one disk breaks then we lose all the information.

In the case of using the ZFS file system, the equivalent RAID type is called RAID-Z1, in this type of RAID we have exactly the same characteristics as RAID 5.

RAID 5 or RAID-Z1 if you use ZFS, allows us to protect the data with parity to mitigate the failure of a disk, in addition, we will increase the reading speed depending on the number of disks used, but we have no gain in writing.

RAID 6

Practically the same as RAID 5, but adds a second level of parity, which allows us to fail up to two hard drives in the RAID and be able to replace them. This type of RAID is used if we want a greater protection of the data, to make that even if half of the hard drives of the RAID fail, we do not have problems when recovering the information. If 3 fail, then all the RAID information is lost, this must be taken into account when creating a RAID of this type.

RAID 6

In exchange for this double parity included in RAID 6 , the total space of two of the four hard drives is lost. For example, in a configuration of 4 hard drives of 4 TB, the total space we would have is 8 TB, with twice the read speed. The total space of a RAID 6 is the space of all hard disks except 2. The read speed improvement is also X-1 times the number of disks used. In the example above, for example, it would be 3 times as much.

Next, you have a summary of the capacity, maximum read and write performance, and the integrity of the data against the failure of one or more disks.

  • Capacity : if we have four hard drives of 4TB each, the capacity of a RAID 6 will be 8TB in total. The capacity is X-2 number of disks, if we take into account that all disks are the same.
  • Read performance : read speed is X-2 times the number of disks used.
  • Write performance : write speed is as if it were a simple disk.
  • Data integrity : the failure of two disks does not lead to the loss of information from the entire RAID, if more than two disks are broken then we lose all the information.

In the case of using the ZFS file system, the equivalent RAID type is called RAID-Z2, in this type of RAID we have exactly the same characteristics as RAID 6.

RAID 6 or RAID-Z2 if you use ZFS, allows us to protect the data with double parity to mitigate the failure of two disks, in addition, we will increase the reading speed (to a lesser extent than RAID 5), but we will also lose more useful space.

RAID 10 or RAID 1 + 0

This type of RAID does not need to do the parity calculation as it happens with RAID 5 and RAID 6, therefore, we will achieve higher read and write speed rates, in addition, we will consume less processor resources because it does not have to calculate parity of all data to write to disk. This type of RAID allows us to create a RAID 0 of two RAID 1, it is necessary to have at least four hard drives to be able to configure this type of RAID.

In this case of RAID 10, a maximum of 2 hard drives can be broken, but it is very important that it be one hard drive from each group of RAID 1. If the two hard drives of a RAID 1 break, we will automatically lose all the information of the entire RAID. Therefore, when a hard drive of the same group breaks, we must be very careful and monitor the status of the other hard drive, because if it also breaks then we will lose all the information.

Raid 10

Next, you have a summary of the capacity, maximum read and write performance, and the integrity of the data against the failure of one or more disks.

  • Capacity : if we have four hard drives of 4TB each, the capacity of a RAID 10 will be 8TB in total. The capacity is X-2 number of disks, if we take into account that all disks are the same.
  • Read performance : Read speed is X times the number of disks used.
  • Write performance : write speed is X-2 times the number of disks.
  • Data integrity : the failure of a disk of each RAID 1 does not lead to data loss, if two disks of a RAID 1 are broken then all the information is lost.

In the case of using the ZFS file system, the equivalent RAID type is not direct, you can make a STRIPE of two MIRROR that would be equivalent.

Other types of RAID

Currently there are other types of RAID that are not usually used because there are better alternatives, in fact, commercial NAS servers do not even give the possibility of configuring their servers with these types of RAID because they do not make much sense. At the end you will find some types of RAID that are used but when we have many hard drives on the server.

RAID 3/4

This type of RAID is very similar to a RAID 5, although inferior in many ways. They offer us reading speeds much higher than the others, but the parity system is not distributed, but everything is stored on one of the hard drives. These configurations are not widely used since the reliability, with respect to that of RAID 5 with distributed parity or any of the following combined, is not too high.

Raid 3

In practice this type of RAID is rarely used.

RAID 01 (0 + 1)

RAID 01 is a RAID 1 created from two RAID 0 configurations. For this RAID configuration, two RAID 0 sets are created (that is, two RAIDs equal to the sum of hard disk space) and then a RAID 1 that duplicates that RAID 0 into another RAID 0. It is not a widely used type of RAID as the fault tolerance is very high and if one of the disks fails, only one of the RAID 0’s remains as a tipping point. If something goes wrong with this, all data is hopelessly lost.

raid 01

This RAID is similar to RAID 10, but much worse in terms of reliability, therefore, it is advisable to go directly to configure a RAID 10.

RAID 30/50/100

These types of RAID are designed for servers that have a large number of hard drives, depending on what interests us, we will have greater capacity, greater speed of reading and writing or greater data integrity because it is more tolerant to failures. For example, a RAID 50 would be a total of three RAID 5 in a RAID 0, allowing that a disk of each RAID 5 group can fail and not have any problem, yes, if two disks of the same RAID 5 group fail all information will be lost.

raid 50

As you have seen, we have a large number of RAID types for our servers, depending on our needs for capacity, fault tolerance and also performance, we must choose one type of RAID or another.

What type of RAID should I choose for my home NAS

Home NAS servers usually have between 2 bays to house hard drives and 6 bays to house hard drives, depending on the number of hard drives we buy and our needs, we can choose between some types of RAID or others that we have explained. If we are interested in improving the speed however, then you should choose RAID such as RAID 0 or RAID 10, if you want better data integrity, then you should choose RAID 1 or RAID 5/6 as we have explained previously. The best thing you can do to calculate the effective capacity, the reading and writing speed, as well as the fault tolerance, is to review what we have explained about each type of RAID, or use the RAID calculators that the main manufacturers have available like QNAP, Synology and even other independent websites.

Next, we are going to indicate what types of RAID we are going to be able to configure depending on the number of hard drives that we can introduce in our NAS server.

  • 2 disks: JBOD, RAID 0 and RAID 1.
  • 3 disks: JBOD (two disks), RAID 0 (two disks), RAID 1 (two disks) and RAID 5 (minimum 3 disks).
  • 4 disks: JBOD, RAID 0, RAID 1, RAID 5, RAID 6 (minimum 4 disks), RAID 10 (minimum 4 disks).
  • 5 disks: JBOD, RAID 0, RAID 1, RAID 5, RAID 6, RAID 10.
  • 6 disks: JBOD, RAID 0, RAID 1, RAID 5, RAID 6, RAID 10, RAID 50 (minimum 6 disks)

As you have seen, depending on the number of bays, the capacity we want to have, and the fault tolerance, we will have to choose one type of RAID or another.