Skip to content

The difference between Raid0, Raid1, Raid5 and Raid10

Overview

Raid (Redundant Array of Indepent Disk ) technology was proposed by the University of California, Berkeley in 1987. It was originally intended to combine small and cheap disks to replace large and expensive disks. At the same time, it is hoped that when a disk fails, it will not cause data access Data protection technology developed for impact. RAID is a redundant array composed of multiple disks, which appears as an independent large storage device under the operating system. It can give full play to the advantages of multiple hard disks, increase the read and write speed of the hard disk, improve the utilization rate of the hard disk, the daily fault tolerance function ensures data security, and is easy to manage. It can continue to work in the event of a problem with any hard disk, and will not be affected by the damaged hard disk. Among them, raid has a variety of disk array combinations, commonly used are raid0, raid1, raid5 and raid10, and each disk array has its advantages.

The difference between different Raids

Raid0

Raid0 technology is to tie multiple (at least two) physical hard disks together through tools to form a large virtual storage device, and divide the data into several pieces and write them to each physical hard disk in turn. In this way, in an ideal situation, the read and write performance of the hard disk will be improved several times, but raid0 also has limitations. While increasing the read and write speed, if any one of the hard disks fails, the data in the entire system will be damaged. destroy. As shown in Figure 1, the data is divided into multiple segments and written to different hard disks, that is, the data is stored in disk1 and disk2 respectively, and finally the speed of reading and writing is improved.

Raid1

If the production environment does not require the read/write speed of the hard disk device, but requires increased data security, then Raid1 technology will be used.

Raid1 technology is to bind two (multiple) physical disk devices. When writing data, the data is written to multiple hard disk devices at the same time (this can be regarded as data backup or time mirroring). When one of the hard disks fails, the data will not be damaged, but the normal use of the data will be restored immediately and automatically by means of hot swapping. Although the Raid1 technology guarantees data security, it also has shortcomings, because the same data is written in multiple devices, so the utilization rate of the hard disk is reduced by half. Theoretically speaking, the real availability rate of the hard disk space shown in Figure 2 is 50%; the availability rate of the Raid1 disk array composed of three hard disks is about 33%, and so on. Since data needs to be written to more than two hard disk devices at the same time, this undoubtedly increases the load of computing functions to a certain extent.

Raid5

Raid5 technology is to save the data parity information of the hard disk device to other hard disk devices. The parity information of the data in the raid5 disk array group is not stored in a certain disk device alone, but is stored in every other corresponding device except itself. The advantage of this is that it will not appear after any one of the devices is damaged. fatal flaw. As shown in Figure 3, the “parity” part stores the parity information of the data. In other words, the Raid5 technology does not actually back up the real data in the disk, but tries to rebuild it through the parity technology when the hard disk device has a problem. Corrupted data. Technical features such as Raid5 “compromise” taking into account the read and write speed of hard disk devices, data security and storage costs.

Raid10

In view of the fact that Raid5 technology compromises the read/write speed and data security due to the cost of disk equipment, but in enterprises, it is more concerned about the value of the data itself than the price of the hard disk, so it is recommended in the production environment Use raid10 technology.

Raid10 is a combination of Raid1 and Raid0, as shown in Figure 4, Raid10 technology requires at least 4 hard disks to build, and two of them are made into Raid1 disk arrays first to ensure data security. Then implement Raid0 technology on the two Raid1 disks according to the array to further improve the read and write speed of the hard disk device. In this way, theoretically speaking, as long as not all disks in the same group are damaged, up to 50% of the hard disk devices can be damaged without data loss. Because Raid10 technology inherits the high-speed writing speed of Raid0 and the data security of Raid1, the performance of Raid10 exceeds Raid5 regardless of the cost, so it has become a widely used storage technology.

Leave a Reply