Friday, August 10, 2012

What is RAID?



In this post I will briefly give an explanation of what RAID is. What are advantages and disadvantages and which options do we face when choosing between the different RAID setups (such as RAID 0, RAID 1, RAID 5, etc.). RAID stands for Redundant Array of Independent Disks . RAID combines two or more disks to achieve higher read / write speeds and / or safety – depending on the chosen setup. Below I will describe the most common RAID setups...

In RAID 0 (also known as "striping") multiple disks (requires a minimum of two disks) are "pooled" together and would thus appear as a single hard drive on your computer, i.e. putting two 2TB drives in a RAID 0 setup, these appear as a single 4TB disc. The advantage of a RAID 0 setup is that it achieves better performance in terms of higher read and write speeds compared to a single harddrive. Let us take an example, suppose a RAID 0 setup with two disks each of which has a read speed of 100 Mb per second. Suppose we want to download a file of 1200 mb. If we had not set up a RAID 0 and had to retrieve the file from one disk, we could only get 100 mb / sec, ergo it will take 12 seconds to load the entire file. If we compare this with a RAID 0 setup with two disks, we could get 100 mb / sec from both drives at the same time - that is 200 mb / sec – by which we will be able to download the file in 6 seconds. The rate can be increased further by using more disks. With three discs, we will thus be able to get 300 mb / sec, so it will take 4 sec. With four discs we will be able to load 400mb/sek corresponding to a 3sec loading time, etc. The downside of RAID 0 is the lack of security. If one of the disks fails, all data is lost without possibility to restore the data.

RAID 1 (also known as "mirroing") can be considered the opposite of the RAID 0. In RAID 1 discs are "mirrored", so that a file is written to all disks in the RAID 1 setup. If one of the harddrives fails the files will still be redeemable from other disc(s). Suppose, as before a setup consisting of two 2TB harddrive, but this time in a RAID 1 setup. These hard drives drives will appear as one drive on 2TB on your computer. Note that with RAID 1 you achieve less available space than with RAID 0 with the same number of disks (if they are of the same size). The advantage of RAID 1 is safety; If one disk fail, you data is not lost. You will be able to replace the defective hard drive, and the healthy disc will then restore the files to the new hard drive so that the two hard drives are again “mirrored”. The disadvantage of RAID 1 is - apart from the less available space mentioned earlier - is that you will not achieve the same level of performance (I.e. speed) as RAID 0. Finally, it is important to note that the RAID 0 (or the more advanced configurations RAID) is not a foolproof protection against data loss. It designed to protect you from hard drive failure. For example, RAID cannot restore deleted files (whatever they are deleted by humans or programs / virus). It is therefore important to know the limitation of RAID and don’t misinterpret it with a backup of your data.

If three (or more) hard drives are used, more advanced RAID setups can be selected, such as RAID 5. A RAID 5 can be seen as something in between RAID 0 and 1, gaining both speed and safety. In a RAID 5 setup no data will be lost if one of the discs fail. This is due to one of the disks being used to write a checksum, making the system able to reconstruct the data on the broken disc. A simple way to explain this is to consider the three disks as variables in an equation, such as: 2 +2 = 4. We assume therefore that hard drive A will contain the value 2, HDD B equally, while the hard drive C will contain the value 4 ("checksum"). The system is safe as long as only one disk fails, since the system is able to derive the missing information (one equation with one unknown variable) if you remove one of the variables (i.e. the broken disc), which will be reconstructed as soon as the failed disk has been replaced. A RAID 5 setup is both a fast and secure. The disadvantage is that the read / write speed in a RAID 5 setup will be slower than an equivalent RAID 0 setup with the same number of disks (but still faster than RAID 1).

Lastly, RAID 0 +1 and RAID 1 +0 should be mentioned. These are, as the names suggests, a combination of RAID 0 and 1 The difference between RAID 0 +1 and RAID 1 +0 is whether the hard drives are mirrored or striped first. The advantage of a these types of setup is that you achieve all the benefits of both RAID 0 and 1. That is a system that is safe and as fast as RAID 0. The disadvantage is that it requires double the number of disks, which will make the set-up of more expensive. The minimum number of disks is four hard drives, but can be expanded to any (evenly) number of hard drives.


Above, I have described the most common and most used RAID setups. However, there are several additional RAID setups, although less frequently used. Please also note that the explanations given here is heavily simplified, but will however – hopefully – given an easily digestible overview of the different RAID systems.

Widgets

No comments:

Post a Comment