Learn what RAID is, what you should use it for and why you should use it on your NAS Server
RAID stands for Redundant Array of Inexpensive Disks, meaning that RAID is a way of putting multiple disks together into a single array. The idea is that these disks working together give you the speed and/or reliability of a more expensive disk. The speed and reliability you get will depend on which type of RAID you are using.
RAID at a glance:
- Summary of Hard Disk Drives and Solid State Drives
- RAID 0 (Striping)
- RAID 1 (Mirroring)
- RAID 5/6 (Striping + Distributed Parity)
- RAID 10 (Mirroring + Striping)
- What about RAID 2, 3,4 and 7?
- RAID is not a substitute for back-ups
- POLL: What RAID would you use?
- Next Post
Quick summary of Hard Disk Drives and Solid State Drives
Hard disk drives (HDD’s) are usually chosen where needs such as speed and performance come after the need for a low cost. Due to physical limitations and the mechanical nature of many high speed moving parts, HDD’s typically have a higher failure rate than Solid State Drives (SSD’s). RAID is used help to mitigate these issues.
What are the different types of RAID?
RAID 0 (Striping)
RAID 0 is having any of disk drives and combining them together to create one large volume. This will increase speeds largely, because you are reading and writing from multiple disks at the same time. A single file can use the speeds and capacities of all of the drives in the RAID 0 array. One downside to RAID 0 is that it is NOT redundant. Meaning, losing one disk or having one disk failing will result complete loss of all data. This type of RAID is much less reliable than just having a single disk.
There are rarely situations where you should use RAID 0 on a server. You can use it for cache or other services where speed comes first and reliability/data loss does not matter. But, it should not be used for anything other than this as there is too large a risk of losing all your data because of a dodgy hard drive. For example, the annual failure rate of a drive is 2.5%. So, if you had a RAID 0 array with 6 disks, you have increased your annual risk to around 15%.
RAID 1 (Mirroring)
RAID 1 is capable of a much more complicated configuration with many more drives, but, the most common scenario is where you have a pair of drives and completely mirror the contents of the first disk to the second one. The point of RAID 1 is mostly for redundancy. So, if you completely lose one drive in your server, you will get no down time.
If one of either drives fails, you can replace the failed drive with almost no downtime. RAID 1 also gives you the benefit of increased read speeds, as data can be read off any of the drives in the drive array. However, there are some downsides, one being that, since data needs to be written to all drives in the array, you will have slightly slower write speeds. As well as this, you will only have the available capacity of the lowest capacity drive (even though you are using two drives). Software RAID 1 solutions do not always allow hot swaps of drives. Meaning, you would have to power down the array to swap the failed drive.
RAID 5/6 (Striping + Distributed Parity)
RAID 5 requires a minimum of 3 drives (RAID 6 requires a minimum of 4 drives). RAID 5 uses the idea of RAID 0, and stipes the data across multiple disks to get faster speeds. But, unlike RAID 0, it adds redundancy by distributing parity information across the disks. In short, with RAID 5 you can lose one drive, and with RAID 6 you can lose two drives, without having any data loss.
RAID 5 and RAID 6 will undoubtedly improve your read speeds but write speeds are largely dependant on the RAID controller used. For RAID 5 or RAID 6, you will certainly need a dedicated hardware controller, due to the need to calculate the parity data and write it across all the disks. RAID 5 and 6 are usually good options for standard web servers, file servers, and other general purpose systems where most of the interactions are read. RAID 5 is a good-value-for-your-money option as you only need to purchase one extra drive for it (or two extra drives for RAID 6) and you will be getting extra speed and redundancy.
RAID 5 or 6 is not the best choice for a heavy write environment, such as a database server, as it will likely slow your overall performance because it has to create parity for each drive on a separate one.
In RAID 5 or RAID 6, if you lose a drive, you are going to have to sacrifice a lot of performance to keep your server operational. This is because once you replace the failed disk, all the data from that disk must be rebuilt out of the parity information from the other drives. This will take a huge amount of the total performance of the array. These rebuild times depend on how large the drive you lost was. The smaller the drive the shorter time it takes to rebuild data. For example, if you lost a 1TB drive, it wouldn’t take too long to rebuild all the data. On the other hand, if you lost a 20TB drive, it would take a really long time to rebuild all of that data (depending on how much of that capacity was being used).
RAID 10 (Mirroring + Striping)
RAID 10 requires a minimum of 4 drives. RAID 10 is a combination of RAID 1 (Mirroring) and RAID 0 (Striping). This means you will have access to faster read and right speeds as well as redundancy. This is the recommended RAID type if you are looking for speed, but also need some redundancy in your system. In a four-drive array, two different drives hold half of the striped data and are each mirrored to another drive. This means you can lose a single drive (or possibly 2) and not lose any data. Like RAID 1, you only have the capacity of half the drives, but you will get improved read and write performance. You will also have the fast drive rebuild time as seen in RAID 1.
What about RAID 2, 3, 4 and 7?
These levels of RAID do exist but are not as commonly used as the other specified above.
RAID is not a substitute for back-ups!
All RAID levels, except for RAID 0, offer protection from a single drive failure. A RAID 6 system even survives 2 disks failing at the same time. For complete data security, you should always back-up your data stored on a RAID system.
- The backup will come in handy if all drives fail at the same time due to a power spike
- It is good to have in the case that the RAID system is stolen or damaged
- The most important reason to back-up your data is due to human error. If someone accidentally deletes an important piece of data, there is no way you can retrieve that data back!