Você está na página 1de 10

http://www.raid-calculator.com/Default.

aspx

What is RAID?

RAID, short for the "Redundant Array of Independent Disks", is


a technology to combine several hard drives into a single
storage unit.

While the hard drives (called "RAID members") are relatively


small, slow, and unreliable, the resulting array can be large,
fast, and reliable. However note that while standalone drives
are miserable but cheap, the drive array is perfect but
expensive. 1

There are different RAID implementations, called RAID


levels achieving different goals at different costs. Please
read RAID types reference for an overview of these
implementations.
Hardware vs. software RAID

The RAID can be implemented either using a special controller


(hardware RAID), or by an operating system driver
(software RAID).

 Entry-level hardware RAID (integrated into the


motherboard or a cheap RAID card) is similar in
performance to the software RAID. Consider entry-level
RAID hardware if the operating system does not support
software RAID. Most common examples are:
o Use fault-tolerant arrays (RAID1 or RAID5) in

Windows XP or Vista.
o Boot Windows from a RAID0 or RAID5 (this is not
possible using software even in Windows Server
editions).
 Enterprise-level hardware RAID controllers are feature-
rich but expensive. They have certain features not possible
in software arrays and never implemented in low-cost
controllers, like caching, hotswapping, and battery backup.
Additionally, certain RAID levels, like RAID50 and RAID60
can only be created with high-end controllers.
 Software RAID, implemented by the operating system
driver, is the cheapest and fairly versatile option. Most
modern operating systems have the software RAID
capability
o Windows uses Dynamic Disks (LDM) to implement

RAID levels 0, 1, and 5. However, fault-tolerant RAID1


and RAID5 are only available in Windows Server
editions.
o Linux uses either the MD-RAID or LVM for a software

RAID.

However, there are certain limitations of a software RAID.

o It is not possible to boot an operating system from a


software RAID0 or RAID5.
o No hotswap is possible with software alone, without a
hardware support. So, software RAIDs have no
hotswap.
Hard drive considerations

 Try to use identical drives in RAID - preferrably, from the


same production batch with consecutvie serial numbers.
This ensures the firmware will be identical on all drives,
which is good for performance. Some experts say that you
should buy drives as diverse as possible instead, because
they feel concerned about correlated failures. In fact, your
backup should cover correlated failures. If you have no
backup, you're a sitting duck regardless of your choice of
the hard drives. RAID does not replace a proper backup.
 If practical, use the drives specifically intended for use in a
RAID, like Western Digital RE (RAID Edition) series. These
drives have some features which are handy in a RAID but
aren't available in desktop hard drives. One example is WD
TLER (Time Limited Error Recovery) feature designed to
prevent drives from dropping out of the array (WD
whitepaper on TLER, Adobe PDF).

RAID Levels

There are many different ways to organize data in a RAID array.


These ways are called "RAID levels". Different RAID levels have
different speed and fault tolerance properties. RAID level 0 is
not fault tolerant. Levels 1, 5, 6, and 1+0 are fault tolerant to a
different degree - should one of the hard drives in the array fail,
the data is still reconstructed on the fly and no access
interruption occurs.

RAID levels 2, 3, and 4 are theoretically defined but not used in


practice.

There are some more complex layouts: RAID 5E/5EE


(integrating some spare space), RAID 50 and 60 (a combination
of RAID 5 or 6 with RAID 0), and RAID DP. These are however
beyond the scope of this reference.

RAID levels comparison chart

RAID 0 RAID 1 RAID 5 RAID 6 RAI


Min number of disks 2 2 3 4
Fault tolerance None 1 disk 1 disk 2 disks 1d
Disk space overhead None 50% 1 disk 2 disks 50

Read speed Fast Fast Slow, see below F


Write speed Fast Fair Slow, See below F
Hardware cost Cheap High (disks) High Very high High
Striping and blocks

Striping is a technique to store data on the disk array. The


contigous stream of data is divided into blocks, and blocks are
written to multiple disks in a specific pattern. Striping is used
with RAID levels 0, 5, 6, and 10.

Block size is selected when the array is created. Typically,


blocks are from 32KB to 128KB in size.
RAID Level 0 (Stripe set)

Use RAID0 when you need performance but the data is not
important.

In a RAID0, the data is divided into blocks, and blocks are


written to disks in turn.

RAID0 provides the most speed improvement, especially for


write speed, because read and write requests are evenly
distributed across all the disks in the array. Note that RAID1,
Mirror, can provide the same improvement with reads but not
writes. So if the request comes for, say, blocks 1, 2, and 3, each
block is read from its own disk. Thus, the data is read three
times faster than from a single disk.

However, RAID0 provides no fault tolerance at all. Should any


of the disks in the array fail, the entire array fails and all the
data is lost.

RAID0 solutions are cheap, and RAID0 uses all the disk capacity.
If RAID0 controller fails, you can do a RAID0 recovery relatively
easy using RAID recovery software. However you should keep
in mind that if the disk failure happens, data is lost irreversibly.
Disk 1 Disk 2 Disk 3
1 2 3
4 5 6
7 8 9

RAID Level 1 (Mirror)

Use mirroring when you need reliable storage of relatively


small capacity.

Mirroring (RAID1) stores two identical copies of data on two


hard drives. Should one of the drives fail, all the data can be
read from the other drive. Mirroring does not use blocks and
stripes.

Read speed can be improved in certain implementations,


because read requests are sent to two drives in turn. Similar to
RAID0, this should increase speed by the factor of two.
However, not all implementations take advantage of this
technique.

Write speed on RAID1 is the same as the write speed of a single


disk, because all the copies of the data must be updated.

RAID1 uses the capacity of one of its drives to maintain fault


tolearnce. This amounts to 50% capacity loss for the array. E.g.
if you combine two 500GB drives in RAID1, you'd only get
500GB of usable disk space.

If RAID1 controller fails you do not need to recover neither


array configuration nor data from it. To get data you should just
connect any of the drives to the known-good computer.
Disk 1 Disk 2
1 1
2 2
3 3

RAID Level 5 (Stripe with parity)

RAID5 fits as large, reliable, relatively cheap storage.

RAID5 writes data blocks evenly to all the disks, in a pattern


similar to RAID0. However, one additional "parity" block is
written in each row. This additional parity, derived from all the
data blocks in the row, provides redundancy. If one of the
drives fails and thus one block in the row is unreadable, the
contents of this block can be reconstructed using parity data
together with all the remaining data blocks.

If all drives are OK, read requests are distributed evenly across
drives, providing read speed similar to that of RAID0. For N
disks in the array, RAID0 provides N times faster reads and
RAID5 provides (N-1) times faster reads. If one of the drives has
failed, the read speed degrades to that of a single drive,
because all blocks in a row are required to serve the request.
Write speed of a RAID5 is limited by the parity updates. For
each written block, its corresponding parity block has to be
read, updated, and then written back. Thus, there is no
significant write speed improvement on RAID5, if any at all.

The capacity of one member drive is used to maintain fault


tolerance. E.g. if you have 10 drives 1TB each, the resulting
RAID5 capacity would be 9TB.

If RAID5 controller fails, you can still recover data from the
array with RAID 5 recoverysoftware. Unlike RAID0, RAID5 is
redundant and it can survive one member disk failure.

While the diagram on the right might seem simple enough,


there is a variety of different layouts in practical use. Left/right
and synchronous/asynchronous produce four possible
combinations (see here for diagrams). Further complicating the
issue, certain controllers implement delayed parity.
Disk 1 Disk 2 Disk 3
1 2 P
3 P 4
P 5 6
7 8 P

RAID Level 6 (Stripe with dual parity)

RAID6 is a large, highly reliable, relatively expensive storage.

RAID6 uses a block pattern similar to RAID5, but utilizes two


different parity functions to derive two different parity blocks
per row. If one of the drives fails, its contents are reconstructed
using one set of parity data. If another drive fails before the
array is recovered, the contents of the two missing drives are
reconstructed by combining the remaining data and two sets of
parity.

Read speed of the N-disk RAID6 is (N-2) times faster than the
speed of a single drive, similar to RAID levels 0 and 5. If one or
two drives fail in RAID6, the read speed degrades significantly
because a reconstruction of missing blocks requires an entire
row to be read.

There is no significant write speed improvement in RAID6


layout. RAID6 parity updates require even more processing
than that in RAID5.

The capacity of two member drives is used to maintain fault


tolerance. For an array of 10 drives 1TB each, the resulting
RAID6 capacity would be 8TB.

The recovery of a RAID6 from a controller failure is fairly


complicated. The main approaches to RAID6 data recovery in
particular and data recovery in general are covered in data
recovery book.
Disk 1 Disk 2 Disk 3 Disk 4
1 2 P1 P2
3 P1 P2 4
P1 P2 5 6
P2 7 8 P1
RAID Level 10 (Mirror over stripes)

RAID10 is a large, fast, reliable, but expensive storage.

RAID10 uses two identical RAID0 arrays to hold two identical


copies of the content.

Read speed of the N-drive RAID10 array is N times faster than


that of a single drive. Each drive can read its block of data
independently, same as in RAID0 of N disks.

Writes are two times slower than reads, because both copies
have to be updated. As far as writes are concerned, RAID10 of
N disks is the same as RAID0 of N/2 disks.

Half the array capacity is used to maintain fault tolerance. In


RAID10, the overhead increases with the number of disks,
contrary to RAID levels 5 and 6, where the overhead is the
same for any number of disks. This makes RAID10 the most
expensive RAID type when scaled to large capacity.

If there is a controller failure in a RAID10, any subset of the


drives forming a complete RAID0 can be recovered in the same
way the RAID0 is recovered. +

Similarly to RAID 5, several variations of the layout are possible


in implementation. For more diagrams, refer here.

Você também pode gostar