This article will aim to explain what RAID is and what role RAID plays in a NAS server. We will also cover the RAID levels in details as well as strengths and weaknesses of different RAID levels. So sit tight and read on if you are looking to buy a NAS server for your home or office and are not sure where to start!
This article is part of a 4 part series about NAS or Network Attached Storage server. This series aims to answer some key questions about NAS servers as well as going into details on features, benefits and specifications. Since the world of NAS is so vast, we have decided to split this series into 4 key areas:
What is NAS, Benefits of Using NAS server and alternatives to NAS for home use
How to choose a NAS server and key features to consider before buying a NAS
How and why are NAS hard drives different from Desktop hard drives
What is RAID and how to make the most of RAID levels in your NAS server (you are here!)
As mentioned earlier in the series, stripped to its most basic concept, a NAS enclosure will let you connect all your hard drives in one synchronised array. You can then plug the whole NAS unit to your laptop/computer, and you will find that you are able to access all your hard drives in one interface.
However, how the individual hard drives appear to you on your computer when you connect to your NAS unit and how the data is stored across multiple hard drives in your NAS server is partly decided by the storage technology or RAID.
RAID stands for Redundant Array of Inexpensive Disks or Drives. But before we dive any deeper, let’s find out a bit about the origins of RAID.
Page content summary
Who invented RAID?
The concept of Redundant Array of Inexpensive Disks or Drives was invented by David Patterson, Garth A. Gibson and Randy Katz at the University of California in 1987.
At the time, storage drives with higher storage capacity were very expensive. They carried out a study and wrote a paper named “A Case for Redundant Arrays of Inexpensive Disks (RAID)” in which they argued that they could beat any top of the range disk drive in terms of performance by using an array of inexpensive hard drives that are usually developed for home use.
By doing so, they were able to prove that multiple cheaper hard drives connected in one array could offer unlimited scalability of storage capacity and also offer redundancy of data at cheaper costs.
In ultra simple terms, think of RAID as a decision making process i.e. how will your NAS unit decide which drive to store your files in if you have more than 1 hard drive in your NAS enclosure.
What is RAID for NAS units in layman’s terms
Circling back to our main objectives here – we are looking for a home file storage solution that can provide not only storage but also long term peace of mind through some type of fault tolerance or data redundancy. We want a storage system that can stand the test of time. We also know that some or all of the independent hard drives will fail at some point in our lifetime.
Therefore, we want a storage system that can store data across multiple hard drives. When one of the drives fail, we want to be able to just replace the damaged drive with a new drive, without worrying about losing data, copying old data into new etc etc
And this is where RAID comes in.
Imagine you have lots of external hard drives, and they are all scattered all over your house. Let’s pretend you have 2 of them. You use drive A for all your photos and videos, drive B for all your documents. When you plug them in to your computer all at once, you simply see them pop up in your file explorer window independently (that is if you have 2 x free USB ports available in your laptop to begin with! Or a USB hub?)
And one day, somehow, if hard drive A where you store all your photos fails, you will lose all your photos and videos. Full stop.
If you had RAID data storage virtualisation technology in place across 2 hard drives inside a NAS server, the story will have been completely different when one of your hard drives failed.
One of the most important benefits of a RAID system is to protect your data in case of hard drive failures. RAID essentially combines all your hard drives into logical arrays of storage spaces. It enables your computer or NAS operating system to treat all independent hard drives connected to it as one logical volume.
RAID then enables storage of your data across all hard drives using disk mirroring or disk striping (depending on the RAID level you choose). RAID also increases your data access performance as you are using multiple disks at once.
So coming back to the 2 hard drive analogy from earlier, RAID will have made sure that all your photos, videos and documents were stored across both 2 drives and the data was mirrored (if you had RAID level 1 setup, more on this soon down below) – which means your data is floating across all drives, and no data is stored on one drive alone.
So when drive A failed, it will not have mattered. You will still have had all your data.
Above is a very simple way of explaining RAID. However, not all RAID systems are created equally.
Brief overview of RAID levels
For the purpose of keeping this article short and easily digestible, we will focus on the following popular/widely used RAID levels:
RAID 0, RAID 1, RAID 5, RAID 6 and RAID 10.
Here’s a brief description of each of the RAID levels. This will be followed by a detailed explanation, advantages and disadvantages of each RAID level further along in this article.
RAID 0 – Data is stored across multiple drives using a method known as striping.
RAID 1 – Data is mirrored/cloned across multiple drives. 1 drive is an exact copy of the other.
RAID 5 – Minimum of 3 drives required. Data is striped across multiple drives. 2 drives used for data storage and 1 is used for parity computations, so data can be rebuilt from those computations if any of the drives fail.
RAID 6 – Similar to RAID 5, but known as double parity RAID, requires a minimum of 4 drives. Data parity computations are stored across 2 drives instead of 1 drive like on RAID 5. Offers higher fault tolerance than RAID 5 but uses more storage space.
RAID 10 – A combination of RAID 1 and 0, often referred to as RAID 1+0 or 10. Uses both striping and mirroring. Requires minimum 4 drives. Striping means data is stored and accessed faster, and at the same time offering higher protection via mirroring.
And here’s a table below to show you side by side how each of the RAID levels mentioned above differ:
How to choose the right RAID level for your NAS server
One of the key things to consider before buying a NAS unit is the storage technology you will use to store your files across multiple hard drives connected in your NAS server. However, your preference of storage technology or RAID is connected to the following elements of your NAS server’s features:
Minimum number of bays you will require in your NAS unit
If you want full mirroring of data that RAID 1 offers for data safety/backup, then you will need at least 2 hard drives in your NAS server. So you will have to go for a NAS server with at least 2 bays.
Capacity of hard drives you want to use on your NAS server
If you decided to go for RAID 1, then mirroring data on RAID 1 means that your storage capacity will be halved. So going on RAID 1 means that you will have to workout the size of your individual hard drives and whether it meets your storage needs i.e. if you buy 2 x 4TB hard drives, then your actual storage capacity on RAID 1 will be 4 TB or 50% of your total storage across both drives.
The speed at which you read and write data on your NAS server
Your choice of RAID level will also dictate the speed at which you copy files over to your hard drives or read/access the files saved in them. For example, RAID 0 is the fastest RAID type, however, it does not offer any fault tolerance at all as your data will be spread across multiple hard drives using a method known as Striping. So if one hard drive fails in RAID 0, you lose all the data. In contrast, data stored in RAID 1 will be slower to write as the data will be written twice across two hard drives. RAID 1 will still provide excellent read speeds as your data will be stored across more than one drive so the retrieval can happen from the quickest drive.
Hardware RAID vs Software RAID
As you may have gathered already from the points discussed above, it requires a certain amount of processing power to implement RAID technology in your storage system or NAS server. Whether your data is mirrored on another drive each time you copy a new movie onto your NAS server or your movie file is simply striped across multiple drives, a computer processor needs to carry out the computations that are required.
For this, you have two options – you can either use your operating system and main CPU to carry this work, or you have a dedicated RAID controller card connected to your main motherboard using a PCIe slot in your NAS server.
RAID system is implemented on most entry level NAS units using an operating system driver – which is referred to as software RAID. The hardware resource comes from the main CPU or processor on your NAS server.
There are numerous advantages and disadvantages to both software and hardware RAID. However, for this article, we will park that debate, and assume that your NAS server will already come with software RAID as standard. Unless you are building your own NAS server, and you install a separate RAID controller card, which we can discuss on another post soon perhaps.
RAID levels explained in Details
As discussed earlier, there are different levels of RAID technologies available. But now that we know what RAID does, we can dive deeper into how RAID levels work and what they can do for you, advantages, drawbacks and key features.
As mentioned earlier, RAID can be used for data redundancy – as in making sure if a hard drive fails, you do not lose any valuable data.
However, RAID is also used for performance improvements – such as increasing the speed at which you can access, or store your data across all your independent hard drives.
Raid 0, 1, 5, 6, 10 and 60 are the most popular levels and each of them offer either redundancy, performance or both. For the purpose of simplicity, these are the levels we will cover in this post.
JBOD –
Before we jump into RAID levels, let’s look at something that is a somewhat limited alternative architecture to RAID – JBOD. JBOD stands for “Just a Bunch of Disks/Drives”
JBOD does have its advantages however in certain use cases over RAID but we will not go into too much details on that today. JBOD is the most basic storage architecture consisting of multiple independent hard drives. It is as if you will see a bunch of drives available to you independently without any connections or relationship between each drive. They are all just independent drives working on their own.
JBOD architecture can use spanning to manage storage across multiple hard drives. This means that data will be stored in hard drive A first, and then when it is full, JBOD will store data in Drive B and then C and so on.
There are few advantages of using JBOD i.e. faster access to data where no mirroring or redundancy is needed.
But for the purpose of this article, we will focus on RAID.
So back to Raid levels, here’s a list of RAID levels explained.
Raid 0 –
Essentially, RAID 0 is one step above JBOD. RAID 0 stores data in your hard drives using a method called striping. Data is copied across multiple hard drives, which means that when you read or write data, you are using multiple drives at once, increasing your speed.
Advantages of RAID 0:
You have access to all your hard drives as one giant volume without the need for accessing individual hard drives separately.
Since there is no data mirroring, you will have access to the full combined capacity of your hard drives. For example, if you have 3 x 1TB drives in RAID 0 array, you will have 3 TB total data storage capacity.
You will have higher read and write speed as this isn’t a complicated system to operate for your RAID system controller.
Weaknesses of RAID 0:
There is no fault tolerance on the RAID 0 system. Therefore, if one of your drives fail, then it’s likely that you will lose all your data across all drives. That is pretty terrible.
Therefore, for our NAS unit for our photos, videos and all home related storage, we will stay away from RAID 0.
RAID 1 for NAS servers
RAID 1 operates by mirroring your hard drives across each other. A minimum of two hard drives will be required in your NAS unit for RAID 1.
RAID 1 will then create an exact replica of your first hard drive on to your second hard drive in your NAS unit. So as you copy files onto your NAS, your NAS unit will clone/mirror the data across two hard drives simultaneously.
This means that if one of your hard drives fails in your NAS unit, then you have the same data perfectly safe on the other hard drive. You simply replace the failed hard drive, and then your NAS unit will rebuild the data from the other hard drive pretty quickly. And most importantly, throughout this process, your NAS will continue functioning without any down time which is a win win too.
However, as you may have guessed already, using RAID 1 also means that you will be cutting your total storage capacity in half. For example, if you have 2 x 4TB hard drives in your NAS unit, then your actual storage capacity will be 4TB as one hard drive is simply used as a mirrored backup of the other.
Same applies for NAS units with 4 hard drive bays. Your total storage capacity on a RAID 1 setup will be exactly half of the total storage capacity across all 4 of your hard drives.
Advantages of RAID 1 on NAS:
Your data will be 100% backed up through mirroring across drives. This means that over the years, when inevitably one of your hard drive fails in your NAS unit, your data will still be safe. All you need to do is simply replace it with a new hard drive, making the data recovery process very straightforward.
Data rebuild is also faster on RAID 1 as the full copy of the data already exists. This is in contrast with parity style builds whereby, the data is rebuilt from parity computations.
Weaknesses of RAID 1 on NAS:
Halved storage capacity due to mirroring of data, hence more expensive.
There will be a slight reduction in performance speed as you write data on to your NAS server. This is because your RAID controller is busy mirroring your data across two or more drives as you copy files into it. However, RAID 1 will still provide excellent read speeds as your data will be stored across more than one drive. So as you read data from a RAID 1 setup, the data can be retrieved from the quickest drive.
To be continued…