onsdag den 7. april 2010

How does it fail: RAID

Because harddisks fail often, it is possible to use multiple harddisks together, to get better safety.

RAID is short for Rapid Array of Inexpensive Disks. It will manage multiple disks and let the computer think there is only one disk. There are in general 3 different kinds of RAID in use today:

RAID 0: Scary raid, never use this! This just makes multiple disks look like a big one. Often reading and writing speeds are higher, because multiple disks can be read and written at the same time. But if just one disk fails, you loose all of your data. This makes the disk of loosing data much higher so never use it! Todays disks are so fast, that there is no practical use of RAID0.

RAID1: Usually used with 2 disks but it only has the size of 1. What you get is 2 disks which always have the same data. One can fail, and your system will keep running. This is the most secure form of RAID, but it is not 100%. When one disk has failed, you have no backup until you have replaced it and there are many examples of data being lost in this time span.

RAID5: Used with more than 2 disks, e.g. 5. Only 1 disk is used as backup, so with 5 disks you have the space of 4. As with RAID1 you loose your data if 2 disks fail at the same time and because you have more disks the risk of this happening is greater.
RAID5 works using "parity". Lets take this calculation: 1 + 2 + 3 + 4 + 5 = 14. If you replace any of these numbers with a ?, it is still easy to derive the missing number, e.g. 1 + 2 + 3 + ? + 5 = 14 <=> 14 - 1- 2 - 3 - 5 = ? = 4.

Finally, there is also the risk that the hardware or program which controls the RAID breaks down.

All in all: RAID fails in the same way as harddisks, just not as often. But it does happen, even with very expensive enterprise systems.