Thursday 9 October 2014

Redundant Array of Inexpensive Disks (RAID)

New Page 1
Recently one of my friend asked me what do I think of Raid 0 which he is thinking of implementing in his
server / workstation. So I grabbed a few books and went through and this is what I found.
"RAID" stands for "Redundant Array of Inexpensive Disks", (now being reinvented the term to
describe a redundant array of independent disks as a means of disassociating a "low cost"
expectation from RAID technology) and refers to several different ways to use multiple hard drives to
either increase performance, reliability or both. RAID is typically transparent to you or the operating
system, other than the fact that there is a dedicated piece of hardware, known as a RAID controller, that
manages the distribution of data across the drives.
Various standard configurations of RAID drives, typically referred to as "RAID arrays", have been labeled
with numbers to differentiate the differing arrangements.
RAID 0 uses two (or more) drives to increase performance.
The approach is this: when you write data to the logical (say, "C:") drive, the data is interweaved in
some way such that half of it is written to one physical drive, and half on the other. Effectively, this
doubles the speed of your hard disk, since the computer can essentially be writing to both at the same
time, instead of writing the same amount of data in two steps to a single drive.
Sounds like a nifty approach, right? You get the same amount of space as you would with two individual
drives, but you get it twice as fast.
The problem is that you get twice as much of something else as well: chance of failure and catastrophic
data loss.
If one drive has, say, a 1 in 1,000 chance of failure, then two drives have a 2 in 1,000 chance.
Now, if you have two separate drives you still have that same 2 in 1,000 chance of one of them failing -
but all you lose is what's on that one drive that fails. In a RAID 0 configuration, you've doubled your
chances of failure, and when failure happens, all of your data on both drives is lost.
Think of it this way: if we take a simple sentence like:
RAID 0 configurations are a bad idea.
and sliced it in half such that every other letter was "on alternate drives", this might be what appears on
each drive:
Drive 1: R I o f g r t o s a e a b d i e .
Drive 2: A D 0 c n i u a i n r a d a
Together they're easy (and quick!) to combine into the original sentence. Take away either one and the
other is so much gibberish.
RAID 0 is valuable as a speed enhancement only if you're willing to take double the risk of failure. That
means either that it's OK if the failure happens and you lose the data, or you're conscientious about
making sure that it's backed up regularly and thoroughly.
What's frustrating, in part, is that once you have a RAID controller anyway, with the addition of a third
(inexpensive) drive you can get all that speed as well as fault tolerance using different RAID
configuration.
Using RAID 5, a third drive contains "parity" information - kind of the "C" in an "A + B = C" type of
equation - lose any of A, B or C and it can be recalculated from the other two. In the world of hard disk
Page 1
New Page 1
drives, that means a drive can fail completely and your system continues to operate while the disk is
replaced. RAID controllers often include "hot swap" ability, so that could even be literal: the drive could
be replaced without stopping or restarting the system.
That's just one example - RAID as a concept actually includes several different arrangements that you
can use to balance performance, fault tolerance and risk.
Just make sure that if you're using RAID 0, you know what you're getting into.
There are various combinations of these approaches giving different trade-offs of protection against data
loss, capacity, and speed. RAID levels 0, 1, and 5 are the most commonly found, and cover most
requirements.
RAID 0 (striped disks) distributes data across several disks in a way that gives improved speed at any
given instant. If one disk fails, however, all of the data on the array will be lost, as there is neither
parity nor mirroring.
RAID 1 mirrors the contents of the disks, making a form of 1:1 ratio real-time backup. The contents
of each disk in the array are identical to that of every other disk in the array.
RAID 5 (striped disks with parity) combines three or more disks in a way that protects data against
loss of any one disk. The storage capacity of the array is reduced by one disk.
RAID 6 (striped disks with dual parity) can recover from the loss of two disks.
RAID 10 (or 1+0) uses both striping and mirroring. "01" or "0+1" is sometimes distinguished from
"10" or "1+0": a striped set of mirrored subsets and a mirrored set of striped subsets are both valid,
but distinct, configurations.
RAID systems with redundancy continue working without interruption when one (or possibly more,
depending on the type of RAID) disks of the array fail, although they are then vulnerable to further
failures. When the bad disk is replaced by a new one the array is rebuilt while the system continues to
operate normally. Some systems have to be powered down when removing or adding a drive; others
support hot swapping, allowing drives to be replaced without powering down. RAID with hot-swapping is
often used in high availability systems, where it is important that the system remains running as much of
the time as possible.
RAID is not a good alternative to backing up data. Data may become damaged or destroyed without
harm to the drive(s) on which they are stored. For example, some of the data may be overwritten by a
system malfunction; a file may be damaged or deleted by user error or malice and not noticed for days
or weeks; and, of course, the entire array is at risk of physical damage.
Following is a brief summary of the most commonly used RAID levels.[3] Space efficiency is given as
amount of storage space available in an array of n disks, in multiples of the capacity of a single drive.
For example if an array holds n=5 drives of 250GB and efficiency is n-1 then available space is 4 times
250GB or roughly 1TB.
Level Description
Minimum
# of
disks
Space
Efficiency Image
"Striped set without parity" or
"Striping". Provides improved performance
and additional storage but no redundancy or
fault tolerance. Any disk failure destroys the
array, which has greater consequences with
more disks in the array (at a minimum,
catastrophic data loss is twice as severe
Page 2
New Page 1
RAID 0
catastrophic data loss is twice as severe
compared to single drives without RAID). A
single disk failure destroys the entire array
because when data is written to a RAID 0
drive, the data is broken into fragments. The
number of fragments is dictated by the
number of disks in the array. The fragments
are written to their respective disks
simultaneously on the same sector. This
allows smaller sections of the entire chunk
of data to be read off the drive in parallel,
increasing bandwidth. RAID 0 does not
implement error checking so any error is
unrecoverable. More disks in the array
means higher bandwidth, but greater risk of
data loss.
2 n
RAID 1
'Mirrored set without parity' or
'Mirroring'. Provides fault tolerance from
disk errors and failure of all but one of the
drives. Increased read performance occurs
when using a multi-threaded operating
system that supports split seeks, as well as a
very small performance reduction when
writing. Array continues to operate so long
as at least one drive is functioning. Using
RAID 1 with a separate controller for each
disk is sometimes called duplexing.
2
1 (size of
the
smallest
disk)
RAID 2
Hamming code parity. Disks are
synchronized and striped in very small
stripes, often in single bytes/words.
Hamming codes error correction is
calculated across corresponding bits on
disks, and is stored on multiple parity disks.
3
RAID 3
Striped set with dedicated parity or bit
interleaved parity or byte level parity.
This mechanism provides fault tolerance
similar to RAID 5. However, because the
strip across the disks is a lot smaller than a
filesystem block, reads and writes to the
array perform like a single drive with a high
linear write performance. For this to work
properly, the drives must have synchronised
rotation. If one drive fails, the performance
doesn't change.
3 n-1
RAID 4
Block level parity. Identical to RAID 3, but
does block-level striping instead of bytelevel
striping. In this setup, files can be
distributed between multiple disks. Each disk
operates independently which allows I/O
requests to be performed in parallel, though
data transfer speeds can suffer due to the
type of parity. The error detection is
achieved through dedicated parity and is
stored in a separate, single disk unit.
3 n-1
Page 3
New Page 1
If you need more info u can browse the following page "http://en.wikipedia.org/wiki/RAID"
thanks
suman bhattacharyya (smn.snr@gmail.com)
a student of K. K. HATI
hati.kk@gmail.com
RAID 5
Striped set with distributed
parity or interleave parity. Distributed
parity requires all drives but one to be
present to operate; drive failure requires
replacement, but the array is not destroyed
by a single drive failure. Upon drive failure,
any subsequent reads can be calculated
from the distributed parity such that the
drive failure is masked from the end user.
The array will have data loss in the event of
a second drive failure and is vulnerable until
the data that was on the failed drive is
rebuilt onto a replacement drive. A single
drive failure in the set will result in reduced
performance of the entire set until the failed
drive has been replaced and rebuilt.
3 n-1
RAID 6
Striped set with dual distributed
parity. Provides fault tolerance from two
drive failures; array continues to operate
with up to two failed drives. This makes
larger RAID groups more practical,
especially for high availability systems. This
becomes increasingly important because
large-capacity drives lengthen the time
needed to recover from the failure of a
single drive. Single parity RAID levels are
vulnerable to data loss until the failed drive
is rebuilt: the larger the drive, the longer
the rebuild will take. Dual parity gives time
to rebuild the array without the data being
at risk if a (single) additional drive fails
before the rebuild is complete.
4 n-2
Page 4

No comments:

Post a Comment