Introduction of RAID5 Working principle

Source: Internet
Author: User

RAID 5 is a storage solution that combines storage performance, data security, and storage costs. For example, RAID 5, which consists of four hard disks, is stored in data Mode 4: In the figure, P0 is the parity information for D0,D1 and D2, P1 is the parity information for D3,D4,D5, and so on. As can be seen from the figure, RAID 5 does not back up the stored data, but instead stores the data and the corresponding parity information on each disk that makes up RAID 5, and the parity information and the corresponding data are stored on separate disks. When a RAID 5 disk data is damaged, the remaining data and the corresponding parity information are used to recover the corrupted data. RAID 5 can be understood as a compromise between RAID 0 and RAID 1. RAID 5 can provide data security for the system, but with a lower level of protection than mirror and higher disk space utilization than mirror. RAID 5 has a similar data read speed as RAID 0, with only one parity information, which is slower than writing to a single disk. And because multiple data corresponds to one parity message, RAID 5 has a higher disk space utilization than RAID 1 and a relatively low storage cost.

RAID 5 Parity information--XOR operation

1. Logical symbols of XOR: ^

2. Logical definition of XOR

The same false, the different is true (0^0=0,1^1=0, 0^1=1, 1^0=1)

3. The logical operation in the computer is 1 true, and 0 means false.

4. Two-byte bitwise XOR Example:

01111001 11100111: xor ^-------------------10011110

5. Suppose that a 3-digit XOR operation model Example: 3 hard disk HD1,HD2,HD3 data information all through the check disk HD4 storage verification Information

Hd1 hd2 Hd3 --hd4
0 0 0 --0
0 0 1 --1
0 1 0 --1
0 1 1 --0
1 0 0 --1
1 0 1 --0
1 1 0 --0
1 1 1 --1

Understand the concept of XOR operation from this model: the result of an even number of 1 is 0, the result of odd number 1 is 1;

Plot RAID 5

The principle of the raid is to use bit striping and the current mainstream block striping partition method, the data is distributed to each hard disk, when the hard disk is damaged by the XOR operation, there will be other hard disk parity blocks and data The data blocks of the stripe magnetic region is calculated and reconstructed rebuild.

First, RAID 5 Striping Architecture: RAID-5 Striping Mode Second, RAID 5 damaged operation mode: RAID-5 Degraded mode Third, RAID 5 xor recovery: RAID-5 xor Data Recovery

Free to provide the latest Linux technology tutorials Books, for open-source technology enthusiasts to do more and better: http://www.linuxprobe.com/

Introduction of RAID5 Working principle

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.