Tuesday, July 14, 2009

Re: [BLUG] Large RAID config suggestions? (This e-mail explains RAID for newbies)

On Tue, Jul 14, 2009 at 04:51:04PM GMT, Steven Black [blacks@indiana.edu] said the following:
>
> I mean, with a hotspare, the array is rebuilt on to the hotspare when a
> drive fails. That's one major I/O operation.
>

Just to make sure its clear. Technically, the array isn't rebuilt (as
in the data that didn't fail stays put), it just writes the missing data
onto the spare drive based on parity calculations of what is on the
other drives.

-------------------------------------------------------------------------
Quick explanation of RAID for those that don't know.

For those that don't know about RAID, in this case RAID-5, it is
like if you had 3 numbers that added up to another number. If you remove
one of the numbers you can figure out what it was by subtracking the
other 2 from the total:

RAID-5 array intact: A B C ParitySum
10 + 12 + 3 = 25

RAID-5 array with a missing drive C:
A B C ParitySum
10 + 12 + ? = 25

Figuring out what is supposed to be on drive C is as simple as:

Parity - B - A = C
25 - 10 - 12 = (3)

This is done in binary on an actual array and it does it in larger
stripes of data. But the idea is the same. When a drive fails that
makes up the array, the data on the filesystem on the array stays intact
and you can go on using your computer while the hardware recalculates
the missing data on the fly (called degraded mode). Then putting a
replacement drive back takes you out of degraded mode, restores your
performance and another drive can fail without data loss. On a server,
usually you use this with hardware that allows you to take out the hard
drive without shutting down the system, like hot swap hard drives.

The RAID can be done in software or via a specialized device called a
RAID controller. Software RAID is something that can be done in Linux
using the mdadm program that comes with the dm-tools. Its slower and
uses the main CPU(s), but its a cheap solution to getting redundancy.
Hardware RAID cards take the load off the CPU and can do other things
like allow you to use RAID-5 with a boot partition that software RAID
can't do.

RAID-1 is simply where the bits on one drive are mirrored to another
drive.

RAID-0 shouldn't be used unless you know what you are doing. I don't
want to even explain it because many people use it incorrectly.

RAID-6 is more complicated, but allows multiple drives to fail. I'll
leave the explanation to Wikipedia:

http://en.wikipedia.org/wiki/RAID-6#RAID_6

Now you know.

--
Mark Krenz
Bloomington Linux Users Group
http://www.bloomingtonlinux.org/
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

No comments: