Introduction to raid, Part2

Source: Internet
Author: User

In this authentication when block A1 is written to disk 0, the same block is
Also written to disk 1. Since the disks are independent of one another,
Write to disk 0 and the write to disk 1 can happen at the same time. However,
When the data is read, The RAID Controller can read block A1 from disk 0 and
Block A2 from disk 1 at the same time since the disks are independent. So
Overall,Write
Performance of a raid-1 array is the same as
Single disk, andRead
Performance is actually faster from a raid-1
Array relative to a single disk.

 

The strength of RAID-1 lies in the fact that disks contains copies of
Data. So if you lose disk 0, the exact same data is also on disk 1. This greatly
Improves data reliability or availability.

The capacity of RAID-1 is the following:

Capacity = min(disk sizes)

Meaning that the capacity of RAID-1 is limited by the smallest disk (you can
Use different size drives in raid-1). For example, if you have a 500 GB disk and
A 400 GB disk, then the maximum capacity wocould be 400 GB (I. e. 400 GB of the 500 GB
Drive is used as a mirror, and the remaining 100 GB is not used). Raid-1 has
Lowest capacity utilization of any RAID configuration.

The reliability or probability of failure is also described in Wikipedia
.
Since the disks are mirrors of one another but still independent,
Probability of having both disks fail, leading to data lose, is
Following:

P(dual failure) = P(single drive)2

So the probability of failure of a raid-1 configuration is the square of
Failure Probability of A Single Drive. Since the probability of failure of
Single Drive is less than 1, that means that the failure of a raid-1 array is
Even smaller than the probability of failure of a single drive. The reference

Has a more extensive discussion about the probability of failure but in general,
The probably is fairly low.

 

One might be tempted to use RAID-1 for storing important data in place
Backups of the Data. While raid-1 improves data reliability or availability, it
Does not replace backups. If the RAID Controller fails, or if the unit
Containing the raid-1 array suffers some sort of failure, then the data is not
Available and may even be lost. Without a backup you don't have a copy of your
Data anymore. However, if you make a backup of the data, you wowould have a copy.
The moral of the tale is-make real backups and don't rely on RAID-1.

Table 2 below is a quick summary of RAID-1 with a few highlights.

Table 2-raid-1 highlights

Raid level Pros Cons Storage Efficiency Minimum number of disks
Raid-1

 

  • Great data redundancy/availability
  • Great MTTF

 

  • Worst capacity utilization of single RAID levels
  • Good read performance, limited Write Performance

50% assuming two drives of the same size 2

Raid-2

This raid level was one of the original five
Defined, but it is no longer really used. The basic concept is that raid-2
Stripes data at the bit level instead of the block level (remember that raid-0
Stripes at the block level) and uses a Hamming Coding
For parity
Computations. In raid-2, the first bit is written on the first drive, the second
Bit is written on the second drive, and so on. Then a Hamming-code parity is
Computed and either stored on the disks or on a separate disk. With this
Approach you can get very high data throughput rates since the data is striped
Using SS several drives, but you also lose a little performance because you have
To compute the parity and store it.

 

A cool feature of RAID-2 is that it can compute single bit errors and recover
From them. This prevents data errors or what some people call "bit ROT". For
Overall Evaluation of RAID-2, there is this link
.

 

According to this
Article
Hard drives added error correction that used Hamming codes, so using them at
Raid level became redundant so people stopped using raid-2.

Raid-3

Raid-3 uses data striping at the byte level and
Also adds parity computations and stores them on a dedicated parity disk. Figure
3 from Wikipedia

(Image by cburnett) how the data is written to four disks in
Raid-3.



Figure
3: Raid-3 layout (from cburnett at Wikipedia under the GFDL
License)

This raid-3 layout uses 4 disks and stripes data between SS three of them and
Uses the fourth disk for storing parity information. So a chunk of data "A" has
Byte A1 written to disk 0, byte A2 is written to disk 1, and byte A3 written
Disk 3. Then the parity of bytes A1, A2, and A3 is computed (this is labeled
AP (1-3)
In Figure 3) and written to disk 3. The process then repeats
Until the entire chunk of data "A" is written. notice that the minimum number
Disks you can have in raid-3 is three (you need 2 data disks and a third disk
Store the parity ).

 

Raid-3 is also capable of very high performance while the addition of parity
Gives back some data reliability and availability compared to a pure striping
Model Ala 'raid-0. Since the number of disks in a stripe is likely to be smaller
Than a block all of the disks in a byte-level stripe are accessed at the same
Time improving read and write performance. However, the raid-3 Configuration
Some possible side effects.

 

In particle, this link

Explains that raid-3 cannot accommodate multiple requests at the same time. This
Results from the fact that a block of data will be spread into SS all members
The raid-3 group (minus the parity disk) and the data has to reside in the same
Location on each drive. This means that the Disks (spindles) have to be accessed
At the same time, using the same stripe, which usually means that the Spindles
Have to be synchronized. As a consequence, if an I/O request for data chunk
Comes into the Array (see figure 3), all of the disks have to seek to
Beginning of the chunk A and read their specific bytes and send it back to
Raid-3 controller. Any other data request, such as that for a data chunk labeled
B In Figure 3 is blocked until the request for "a" has completed because all
The drives are being used.

The capacity of RAID-3 is the following:

Capacity = min(disk sizes) * (n-1)

Meaning that the capacity of RAID-3 is limited by the smallest disk (you can
Use different size drives in raid-3) multiplied by the number of drives
N
, Minus one. The "minus one" part is because of the dedicated parity
Drive.

 

Raid-3 has some good performance since it is similar to raid-0 (striping ),
But you have to assume some functions in performance because of the parity
Computations (this is done by the RAID Controller). However, if you lose
Parity disk you will not lose data (the data remains on the other disks). If you
Lose a data disk, you still have the parity disk so you can recover data. So
Raid-3 offers more data availability and reliability than RAID-0 but with some
Functions in performance because of the parity computations and I/O. More
Discussion about the performance of RAID-3 is contained at this link
.

 

Raid-3 isn' t very popular in the real-world but from time to time you do see
It used. Raid-3 is used in situations where raid-0 is totally unacceptable
Because there is not enough data redundancy and the data throughput ction
Due to the data parity computations is acceptable.

Table 3 below is a quick summary of RAID-3 with a few highlights.

Table 3-raid-3 highlights

Raid level Pros Cons Storage Efficiency Minimum number of disks
Raid-3

 

  • Good data redundancy/availability (can tolerate the lose of 1 drive)
  • Good read performance since all of the drives are read at the same time
  • Reasonable write performance but parity computations cause some functions in
    Performance
  • Can lose one drive without losing data

 

  • Spindles have to be synchronized
  • Data access can be blocked because all drives are accessed at the same time
    For read or write

(N-1)/n
WhereN
Is the number
Drives
3 (have to be identical)

Raid-4

Raid-3 improved data redundancy by adding a parity
Disk to add some reliability. In a similar fashion, raid-4 builds on RAID-0
Adding a parity disk to block-level striping. Since the striping is now down
A block level, each disk can be accessed independently to read or write data
Allowing multiple data access to happen at the same time. Figure 4 below from Wikipedia

(Image by cburnett) how the data is written to four disks in
Raid-4.



Figure
4: Raid-4 Layout (from cburnett at Wikipedia under the GFDL License)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.