Tuesday, April 13, 2010

Raid!

RAID actually stands for Redundant Array of Inexpensive Drives, and means that instead of writing the file once to one drive, my computer writes to more than one drive. I can't have RAID if I only have one hard drive. I must have more than one. And if I have a second drive hooked up to my computer, but I have to copy files from one drive to another, even if it is automatic to make the copy, it isn't really RAID. The goal of RAID is for the action to happen as the file is being written to the drive.

There are several different types of RAID. I can have RAID set up so my computer is writing part of a file to one drive and part of the file to a different drive. Like having two printers, one printing the odd-numbered pages and one printing the even numbered pages. My print job will finish faster, but I still only end up with one copy. That is called RAID 0 (zero).

In RAID 1, my computer writes the data twice, once to each of two drives. If one drive fails, the data is sitting on the other drive. If both drives fail, I lose data. RAID 1 is also called mirroring. It's actually slower than writing to only one drive, even though my computer is writing to both drives at the same time.

Then there is RAID 5. It doesn't mean that I've got five drives. It means that I have at least three and I could have a whole lot more than three. My computer writes a part of each file to different drives and it throws in some fancy math as well. If I have three drives set up as RAID 5, I'll have 1/3 of the file on the first drive along with a bit of fancy math, 1/3 on the second and that fancy math and 1/3 of the file will be on the third drive with the fancy mats as well. The fancy math allows what is on one drive to be re-created. Say a drive fails. Drat! I go out and buy a new one. I unplug the dead drive and plug in the replacement drive. I tell my computer to get to work and regenerate the lost data. Poof! I have not lost any data, even though a drive failed! Wow. However, if I lose a second drive before I replace and regenerate the first failed drive, I lose all of my data. RAID 5 can be fast.

In between RAID 1 and RAID 5 are several other types of RAID. Some are really good at making computers read files faster, some make computers write files faster. It is possible to combine different types of RAID for even greater redundancy. For example, it is possible to combine RAID 1 and RAID 5. It won't be fast, but the data will be safe.

For most home users, RAID 1, or mirroring, is plenty. While it is slower, it isn't cripplingly slow. It's easy to set up and easy to understand. The most important thing to remember is that it is a mirror. The drives should be the same size, or I will end up wasting space on the larger drive.

No comments: