Standard RAID levels: Difference between revisions
m Bild durch SVG-Version ersetzt |
Added a new reference for minimum number of disk as the previous reference cited did not have that statement. |
||
Line 58: | Line 58: | ||
[[File:RAID 5.svg|thumb|300px|Diagram of a RAID 5 setup with distributed [[Parity bit|parity]] with each color representing the group of blocks in the respective [[Parity bit|parity]] block (a stripe). This diagram shows left asymmetric algorithm]] |
[[File:RAID 5.svg|thumb|300px|Diagram of a RAID 5 setup with distributed [[Parity bit|parity]] with each color representing the group of blocks in the respective [[Parity bit|parity]] block (a stripe). This diagram shows left asymmetric algorithm]] |
||
A '''RAID 5''' comprises block-level striping with distributed parity. Unlike in RAID 4, parity information is distributed among the drives. It requires that all drives but one be present to operate. Upon failure of a single drive, subsequent reads can be calculated from the distributed parity such that no data is lost |
A '''RAID 5''' comprises block-level striping with distributed parity. Unlike in RAID 4, parity information is distributed among the drives. It requires that all drives but one be present to operate. Upon failure of a single drive, subsequent reads can be calculated from the distributed parity such that no data is lost.<ref name="Patterson_1994">{{Cite journal |url=http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.41.3889 |first1=Peter |last1=Chen |first2=Edward |last2=Lee |first3=Garth |last3=Gibson |first4=Randy |last4=Katz |first5=David |last5=Patterson |title=RAID: High-Performance, Reliable Secondary Storage |work=ACM Computing Surveys |volume=26 |pages=145–185|year=1994}}</ref> RAID 5 requires at least three disks.<ref>{{cite web |
||
| url = http://www.vantagetech.com/faq/raid-5-recovery-faq.html |
|||
| title = RAID 5 Data Recovery FAQ | work = Vantage Technologies |
|||
| accessdate = 2014-07-16 |
|||
| publisher = www.vantagetech.com |
|||
}}</ref> |
|||
{{clear}} |
{{clear}} |
||
== RAID 6 == |
== RAID 6 == |
||
[[File:RAID 6.svg|thumb|300px|Diagram of a RAID 6 setup, which is identical to RAID 5 other than the addition of a second [[Parity bit|parity]] block]] |
[[File:RAID 6.svg|thumb|300px|Diagram of a RAID 6 setup, which is identical to RAID 5 other than the addition of a second [[Parity bit|parity]] block]] |
Revision as of 06:41, 16 July 2014
The standard RAID levels are a basic set of RAID configurations that employ the techniques of striping, mirroring, or parity to create large reliable data stores from general purpose computer hard disk drives. The most common types today are RAID 0 (striping), RAID 1 and variants (mirroring), RAID 5 (distributed parity) and RAID 6 (dual parity). RAID levels and their associated data formats are standardized by the Storage Networking Industry Association in the Common RAID Disk Drive Format (DDF) standard.[1]
RAID 0
A RAID 0 (also known as a stripe set or striped volume) splits data evenly across two or more disks (striped) without parity information for speed. RAID 0 was not one of the original RAID levels and provides no data redundancy. RAID 0 is normally used to increase performance, although it can also be used as a way to create a large logical disk out of two or more physical ones.
A RAID 0 can be created with disks of differing sizes, but the storage space added to the array by each disk is limited to the size of the smallest disk. For example, if a 100 GB disk is striped together with a 350 GB disk, the size of the array will be 200 GB (100 GB × 2).
The diagram shows how the data is distributed into Ax stripes to the disks. Accessing the stripes in the order A1, A2, A3, ... provides the illusion of a larger and faster drive. Once the stripe size is defined on creation it needs to be maintained at all times.
Performance
RAID 0 is also used in areas where performance is desired and data integrity is not very important, for example in some computer gaming systems. Although some real-world tests with computer games showed a minimal performance gain when using RAID 0, albeit with some desktop applications benefiting,[2][3] another article examined these claims and concluded: "Striping does not always increase performance (in certain situations it will actually be slower than a non-RAID setup), but in most situations it will yield a significant improvement in performance."[4]
RAID 1
An exact copy (or mirror) of a set of data on two disks. This is useful when read performance or reliability is more important than data storage capacity. Such an array can only be as big as the smallest member disk. A classic RAID 1 mirrored pair contains two disks.[5]
RAID 2
A RAID 2 stripes data at the bit (rather than block) level, and uses a Hamming code for error correction. The disks are synchronized by the controller to spin at the same angular orientation (they reach Index at the same time), so it generally cannot service multiple requests simultaneously. Extremely high data transfer rates are possible. This is the only original level of RAID that is not currently used.[6][7]
All hard disks eventually implemented Hamming code error correction. This made RAID 2 error correction redundant and unnecessarily complex. This level quickly became useless and is now obsolete. There are no commercial applications of RAID 2.[6][7]
RAID 3
A RAID 3 uses byte-level striping with a dedicated parity disk. RAID 3 is very rare in practice. One of the characteristics of RAID 3 is that it generally cannot service multiple requests simultaneously. This happens because any single block of data will, by definition, be spread across all members of the set and will reside in the same location. So, any I/O operation requires activity on every disk and usually requires synchronized spindles.
This makes it suitable for applications that demand the highest transfer rates in long sequential reads and writes, for example uncompressed video editing. Applications that make small reads and writes from random disk locations will get the worst performance out of this level.[7]
The requirement that all disks spin synchronously, a.k.a. lockstep, added design considerations to a level that didn't give significant advantages over other RAID levels, so it quickly became useless and is now obsolete.[6] Both RAID 3 and RAID 4 were quickly replaced by RAID 5.[8] RAID 3 was usually implemented in hardware, and the performance issues were addressed by using large disk caches.[7]
RAID 4
A RAID 4 uses block-level striping with a dedicated parity disk.
In the example on the right, a read request for block A1 would be serviced by disk 0. A simultaneous read request for block B1 would have to wait, but a read request for B2 could be serviced concurrently by disk 1.
RAID 4 is very uncommon, but one enterprise level company that has previously used it is NetApp. The aforementioned performance problems were solved with their proprietary Write Anywhere File Layout (WAFL), an approach to writing data to disk locations that minimizes the conventional parity RAID write penalty. By storing system metadata (inodes, block maps, and inode maps) in the same way application data is stored, WAFL is able to write file system metadata blocks anywhere on the disk. This approach in turn allows multiple writes to be "gathered" and scheduled to the same RAID stripe—eliminating the traditional read-modify-write penalty prevalent in parity-based RAID schemes.[9]
RAID 5
A RAID 5 comprises block-level striping with distributed parity. Unlike in RAID 4, parity information is distributed among the drives. It requires that all drives but one be present to operate. Upon failure of a single drive, subsequent reads can be calculated from the distributed parity such that no data is lost.[10] RAID 5 requires at least three disks.[11]
RAID 6
RAID 6 extends RAID 5 by adding an additional parity block; thus it uses block-level striping with two parity blocks distributed across all member disks.
Performance (speed)
RAID 6 does not have a performance penalty for read operations, but it does have a performance penalty on write operations because of the overhead associated with parity calculations. Performance varies greatly depending on how RAID 6 is implemented in the manufacturer's storage architecture – in software, firmware or by using firmware and specialized ASICs for intensive parity calculations. It can be as fast as a RAID-5 system with one fewer drive (same number of data drives).[12]
Implementation
According to the Storage Networking Industry Association (SNIA), the definition of RAID 6 is: "Any form of RAID that can continue to execute read and write requests to all of a RAID array's virtual disks in the presence of any two concurrent disk failures. Several methods, including dual check data computations (parity and Reed-Solomon), orthogonal dual parity check data and diagonal parity, have been used to implement RAID Level 6."[13]
Computing parity
Two different syndromes need to be computed in order to allow the loss of any two drives. One of them, P can be the simple XOR of the data across the stripes, as with RAID 5. A second, independent syndrome is more complicated and requires the assistance of field theory.
To deal with this, the Galois field is introduced with , where for a suitable irreducible polynomial of degree . A chunk of data can be written as in base 2 where each is either 0 or 1. This is chosen to correspond with the element in the Galois field. Let correspond to the stripes of data across hard drives encoded as field elements in this manner (in practice they would probably be broken into byte-sized chunks). If is some generator of the field and denotes addition in the field while concatenation denotes multiplication, then and may be computed as follows ( denotes the number of data disks):
For a computer scientist, a good way to think about this is that is a bitwise XOR operator and is the action of a linear feedback shift register on a chunk of data. Thus, in the formula above,[14] the calculation of P is just the XOR of each stripe. This is because addition in any characteristic two finite field reduces to the XOR operation. The computation of Q is the XOR of a shifted version of each stripe.
Mathematically, the generator is an element of the field such that is different for each nonnegative satisfying .
If one data drive is lost, the data can be recomputed from P just like with RAID 5. If two data drives are lost or a data drive and the drive containing P are lost, the data can be recovered from P and Q or from just Q, respectively, using a more complex process. Working out the details is extremely hard with field theory. Suppose that and are the lost values with . Using the other values of , constants and may be found so that and :
Multiplying both sides of the equation for by and adding to the former equation yields and thus a solution for , which may be used to compute .
The computation of Q is CPU intensive compared to the simplicity of P. Thus, a RAID 6 implemented in software will have a more significant effect on system performance, and a hardware solution will be more complex.
Comparison
The following table provides an overview of some considerations for standard RAID levels. In each case:
- Array space efficiency is given as an expression in terms of the number of drives, ; this expression designates a fractional value between zero and one, representing the fraction of the sum of the drives' capacities that is available for use. For example, if three drives are arranged in RAID 3, this gives an array space efficiency of thus, if each drive in this example has a capacity of 250 GB, then the array has a total capacity of 750 GB but the capacity that is usable for data storage is only 500 GB.
- Array failure rate is given as an expression in terms of the number of drives, , and the drive failure rate, (which is assumed identical and independent for each drive) and can be seen to be a Bernoulli trial.[citation needed] For example, if each of three drives has a failure rate of 5% over the next three years, and these drives are arranged in RAID 3, then this gives an array failure rate over the next three years of:
Level | Description | Minimum number of drives[a] | Space efficiency | Fault tolerance | Array failure rate[b] | Read performance | Write performance | Figure |
---|---|---|---|---|---|---|---|---|
RAID 0 | Block-level striping without parity or mirroring | 2 | 1 | 0 (none) | n× | n× | ||
RAID 1 | Mirroring without parity or striping | 2 | 1/n | n−1 drives | n×[c] | 1× | ||
RAID 2 | Bit-level striping with dedicated Hamming-code parity | 3 | 1 − 1/n ⋅ log2(n-1) | RAID 2 can recover from one drive failure or repair corrupt data or parity when a corrupted bit's corresponding data and parity are good. | (Varies) | (Varies) | (Varies) | |
RAID 3 | Byte-level striping with dedicated parity | 3 | 1 − 1/n | 1 drive | (n−1)× | (n−1)×[d] | ||
RAID 4 | Block-level striping with dedicated parity | 3 | 1 − 1/n | 1 drive | (n−1)× | (n−1)×[d][citation needed] | ||
RAID 5 | Block-level striping with distributed parity | 3 | 1 − 1/n | 1 drive | (n−1)×[d] | (n−1)×[d][citation needed] | ||
RAID 6 | Block-level striping with double distributed parity | 4 | 1 − 2/n | 2 drives | (n−2)×[d] | (n−2)×[d][citation needed] | ||
RAID 1+0 | Mirroring without parity, and block-level striping | 4 | 2/n | 1 drive / span[e] | n×[f] | (n/spans)× | ||
Level | Description | Minimum number of drives[a] | Space efficiency | Fault tolerance | Array failure rate[b] | Read performance | Write performance | Figure |
Non-standard RAID levels and non-RAID drive architectures
Alternatives to the above designs include nested RAID levels, non-standard RAID levels, and non-RAID drive architectures. Non-RAID drive architectures are referred to by similar acronyms, notably SLED, Just a Bunch of Disks, SPAN/BIG, and MAID.
Notes
- ^ a b Assumes a non-degenerate minimum number of drives
- ^ a b Assumes independent, identical rate of failure amongst drives
- ^ Theoretical maximum, as low as 1× in practice
- ^ a b c d e f Assumes hardware is fast enough to support
- ^ RAID 10 can only lose one drive per span up to the max of n/2 drives.
- ^ Theoretical maximum, as low as (n/spans)× in practice
References
- ^ "Common raid Disk Data Format (DDF)". SNIA.org. Storage Networking Industry Association. Retrieved 2013-04-23.
- ^ "Western Digital's Raptors in RAID-0: Are two drives better than one?". AnandTech. July 1, 2004. Retrieved 2007-11-24.
- ^ "Hitachi Deskstar 7K1000: Two Terabyte RAID Redux". AnandTech. April 23, 2007. Retrieved 2007-11-24.
- ^ "RAID 0: Hype or blessing?". Tweakers.net. August 7, 2004. Retrieved 2008-07-23.
- ^ "19.3. RAID1 - Mirroring". FreeBSD Handbook. freebsd.org. 2014-03-23. Retrieved 2014-06-11.
- ^ a b c Derek Vadala (2003). Managing RAID on Linux. O'Reilly Series (illustrated ed.). O'Reilly. p. 6. ISBN 9781565927308.
- ^ a b c d Evan Marcus, Hal Stern (2003). Blueprints for high availability (2, illustrated ed.). John Wiley and Sons. p. 167. ISBN 9780471430261.
- ^ Michael Meyers, Scott Jernigan (2003). Mike Meyers' A+ Guide to Managing and Troubleshooting PCs (illustrated ed.). McGraw-Hill Professional. p. 321. ISBN 9780072231465.
- ^ "NetApp DNA".(password-protected)
- ^ Chen, Peter; Lee, Edward; Gibson, Garth; Katz, Randy; Patterson, David (1994). "RAID: High-Performance, Reliable Secondary Storage". ACM Computing Surveys. 26: 145–185.
- ^ "RAID 5 Data Recovery FAQ". Vantage Technologies. www.vantagetech.com. Retrieved 2014-07-16.
- ^ Rickard E. Faith (13 May 2009). "A Comparison of Software RAID Types".
{{cite journal}}
: Cite journal requires|journal=
(help) - ^ "Dictionary R". Storage Networking Industry Association. Retrieved 2007-11-24.
- ^ Anvin, H. Peter (21 May 2009). "The mathematics of RAID-6" (PDF). Retrieved November 4, 2009.