Disk array RAID0, RAID1 and RAID5 Differences and security Introduction _ Server Other

Source: Internet
Author: User

RAID 0: Stripe group without error control

To implement RAID0 must have more than two hard drives, RAID0 implements the stripe group, the data is not stored on a hard disk, but is divided into blocks of data stored on different drives. Because the data is distributed across different drives, the data throughput is greatly increased and the load on the drive is more balanced. If exactly the data you need is the most efficient on a different drive. It does not need to compute the checksum code, the realization is easy. Its disadvantage is that it does not have data error control, if the data in a drive is wrong, even if the data on the other disk is correct and useless. It should not be used for situations where data stability is required. It is more appropriate for users to use RAID0 for images (including animation) editing and other occasions where transmission is more demanding. At the same time, RAID can increase the data transfer rate, such as the required read files distributed on two hard drives, the two hard drives can be read at the same time. The original time to read the same file was shortened to 1/2.


RAID 1: Mirror image structure

For devices using this RAID1 structure, the RAID controller must be able to read two disks at the same time and write to two mirror disks. You can also see from the following structure diagram that you must have two drives. Because it is the mirror structure in a set of disk problems, you can use the mirror image, improve the system fault-tolerant ability. It is relatively easy to design and implement. The disk can read only one piece of data per read, which means that the data block transfer rate is the same as that of the individual disk. Because the RAID1 is very complete, so it has a great impact on the processing power of the system, the usual RAID function is implemented by the software, and this implementation method can greatly affect the server efficiency when the server load is heavy. When your system requires very high reliability, such as data statistics, then use RAID1 is more appropriate. and RAID1 technology to support the "hot swap", that is, the continuous power of the case of the failure of the disk to replace the replacement, as long as the recovery from the mirror disk data can be. When the primary hard drive is damaged, the mirrored hard drive will work instead of the main hard drive. Mirrored hard disk is equivalent to a backup disk, it is conceivable that this type of hard disk mode security is very high, but the result is hard disk capacity utilization is very low, only 50%, is the lowest of all RAID levels.

Although RAID 0 can provide more space and better performance, the entire system is very unreliable and, in the event of a failure, cannot be remedied. As a result, RAID 0 is generally used only when the data security requirements are not high.

RAID 1 is very different from RAID 0, and its technical focus is on how to maximize the reliability and the availability of the system without impacting performance. Although RAID 1 is the most expensive of all RAID levels, one chooses raid to save critical critical data.

RAID 1 is also known as disk mirroring, and each disk has a corresponding mirror disk. Data writes to any disk are copied to the mirrored disk; The system can read data from any disk in a set of mirrored disks. Obviously, disk mirroring will definitely increase system costs. Because the space we can use is only half the sum of all the disk capacity. The following figure shows a disk image of 4 hard disks, which can be used as a storage space for only two hard disks (the mirrored portion of the slash).

Under RAID 1, any failure of a hard drive will not affect the normal operation of the system, and as long as you can guarantee that at least one of the disks in any pair of mirrors can be used, RAID 1 can even work uninterrupted when there is a problem with half the number of hard drives. When a hard drive fails, the system ignores the hard drive and instead uses the remaining mirror to read and write data.

Typically, we call a RAID system that has a hard disk failure to run in degraded mode. Although the saved data can still be used, the RAID system will no longer be reliable. If the remaining mirror disk is also problematic, the entire system crashes.   Therefore, we should replace the damaged hard disk in time to avoid any new problems. After the new disk is replaced, the data in the original good disk must be copied to the new disk. This operation is referred to as a synchronous mirror. Synchronous mirroring generally takes a long time, especially when the capacity of the damaged hard disk is large. While synchronous mirroring is in progress, external access to the data is not affected, but the performance of the entire system may be reduced due to the amount of bandwidth required to replicate the data.

Because RAID 1 is primarily disk mirroring through two reads and writes, the disk controller is heavily loaded, especially in environments that require frequent data writes. To avoid performance bottlenecks, it is necessary to use multiple disk controllers. The following figure illustrates a disk image that uses two directors.

The use of two disk controllers can improve performance and further improve the security and availability of data. We already know that RAID 1 allows up to half the number of hard drives to fail, so the system can still use another disk controller to continue working, depending on how we set up the previous image (the original and mirror disks are connected to separate disk controls). In this way, some of the damage caused by accidental operation can be reduced to a minimum degree.

RAID 0+1

Using RAID 1 alone also has the same problem of using RAID 0 alone, where you can write data to only one disk at a time and not make the most of all resources. To solve this problem, we can create a stripe set in disk mirroring. Because this configuration combines the advantages of stripe set and mirroring, it is called a raid 0+1.

RAID5: Distributed parity independent disk architecture

From its schematic, it can be seen that its parity code exists on all disks, where the p0 represents the parity value of the No. 0 band, and the other meanings are the same. The efficiency of RAID5 is very high, the writing efficiency is general, and the block-type collective access efficiency is good. Because parity codes are on different disks, they improve reliability. But it is not good for the parallelism of data transmission, and the design of controller is very difficult. The important difference between RAID 3 and RAID 5 is that RAID 3 involves all the array disks for each data transfer. For RAID 5, most data transfers are performed on a single disk and can be done in parallel. In RAID 5, there is "write loss", that is, each write operation, will produce four actual read/write operations, of which two read the old data and parity information, two times to write new data and parity information.

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.