[Hard disk] RAID

English RAID Redundant Array of Independent Disks (redundant array of independent disks), referred to as a disk array. The following individual levels of RAID are described below.

 

I. Why Raid?

 

1, high-speed disk access (speed): a hard drives ordinary RAID disk array, the write data in the host, the host to the RAID controller data to be written into a plurality of blocks of data, and then written to disk in parallel arrays; when the host reads data, RAID controller reads data in parallel on each dispersed in the hard disk array, to reassemble them back to the host. Since a parallel read and write operations, thereby improving the access speed of the storage system.

 

2, expansion.

 

3, data redundancy.

 

Second, the classification

 

RAID level can be divided into levels 0 to 6, usually referred to as: RAID0, RAID1, RAID2, RAID3, RAID4, RAID5, RAID6.

 

RAID0: RAID0 is not really a RAID configuration, not data redundancy, RAID0 segmentation data continuously and in parallel read / write to multiple disks. Thus a high data transfer rate, but RAID0 while improving performance and reliability of the data is not provided, if a disk fails, the data will affect the whole. RAID0 can not therefore be applied to critical applications requiring high data availability.

 

RAID0 advantages: the fastest read and write performance , if each disk has a separate controller performance will be better.

 

RAID0 drawback: Any one hard disk failure all data will be lost, most of the controllers are implemented by software, so performance is not good.

 

-----------------------------------------------------------------------

 

RAID1: RAID1 data redundancy through mirroring data, generates data on both mutual backup disk separation. RAID1 can improve the performance of read, when the original data is busy, data can be read directly from the image. RAID1 disk array highest cost, but offers the best data availability. When a disk fails, the system can be automatically switched to the mirror disk, without the need for reassembling the data failure.

 

RAID1 advantages of: high data reliability, easy to implement, simple design.

 

RAID1 drawback: the slower than RAID0 compared to speed, especially write speed, the other is that we can only use half of the hard drive capacity.

 

-----------------------------------------------------------------------

 

RAID0+1

 

This pattern is actually a combination of RAID RAID0 and RAID1 mode, at least four hard disks. Wherein a composition of any two RAID0 disk array and disk array can be seen as two RAID0 two larger capacity, faster hard, they then form a RAID1 arrays. Such a system ensures higher disk performance and higher data security. Of course, the disadvantage is also obvious is the high cost structure is more complex. RAID5 RAID0 + 1 after the fault-tolerant performance, the general terms used in the file servers.

 

-----------------------------------------------------------------------

 

RAID2: Conceptually, RAID3 RAID2 with similar, both compartmentalization of data distributed on different hard drives, bar units of bits or bytes. However RAID2 use as "increase the average error-correcting code" coding techniques to provide error checking and recovery. This encoding technique requires more disk storage inspection and recovery information, so that more complex embodiment RAID2 technology. Therefore, rarely used in a commercial environment.

 

RAID2 advantages of: data security, as long as the hard disk is not stored checksum failure data can be restored.

 

RAID2 drawback: the expensive, require specialized checksum hard disk storage efficiency is not high, without the support of business applications.

 

-----------------------------------------------------------------------

 

RAID3: Unlike RAID2, RAID3 single disks store parity information. If a disk failure, parity disks and other data disk can be re-generated data. If the parity disk failure did not affect the use of the data. RAID3 for a large number of continuous data can provide a good transfer rate, but for random data, the parity disk write operations becomes a bottleneck.

 

RAID3 advantage: The more suitable for video editing and other applications requiring large amounts of data calls.

 

RAID3 drawback: the rotational speed of each drive to achieve synchronization very difficult (at present most of the hard drives do not support this feature), require complex controller.

 

-----------------------------------------------------------------------

 

RAID4: RAID4 RAID5 and compartmentalization of data and similarly distributed on different disks, but bar or recording unit blocks. RAID4 use a disk as a parity disk, each write operation requires access parity disk, become a bottleneck for write operations. Rarely used in commercial applications.

 

RAID4 advantages: In addition to the advantages of RAID3, it does not need to synchronize the drive speed.

 

RAID4 disadvantages: the write performance required higher poor controller.

 

-----------------------------------------------------------------------

 

RAID5: RAID5 parity disk is not specified separately, but cross-access to data and parity information on all disks. On a RAID5, the read / write pointer array devices can operate simultaneously, providing higher data traffic. RAID5 more suitable for small data blocks, random data read and write. Compared with a RAID5 RAID3, RAID3 important distinction is that once for each data transmission, the need to involve all of the disk array. For RAID5, most data transmission only for a disk operation can be performed in parallel. The "write losses" in RAID5, that is once every write operation will have four actual read / write operations, two of which were read the old data and parity information, the two write new data and parity information.

 

RAID5 advantages of: no special checksum disk, reading speed, but also solves the problem of relatively slow write speed.

 

RAID5 disadvantages: the write performance is still not satisfactory.

 

-----------------------------------------------------------------------

 

RAID6: RAID6 compared with RAID5, adds a second independent parity block. Two independent parity systems use different algorithms, data reliability is very high. Even if two disks fail simultaneously, it will not affect the use of the data. But more needs to be allocated to parity information disk space, compared to RAID5 have more "write the loss." RAID6 write performance very poor, poor performance and complexity of such embodiments RAID6 rarely used.

 

RAID6 advantages: The fast read performance, greater fault tolerance. RAID6 drawback: the slow write speeds, RAID controller in the design of more complex, higher cost.

 

Details

 

RAID0 

Stripe (Stripe) storage. Theoretically, there are N number RAID0 disks is N times the single disk access speed. RAID 0 consecutive bits or bytes divided data, parallel read / write on a plurality of disks, and therefore has a high data transfer rate, but it has no data redundancy, and therefore not be true RAID configuration.

 

RAID1 

Mirror (Mirror) storage. It is data redundancy through mirroring disk data, generates data on a mutual backup pair of independent disks. When the original data is busy, data can be read directly from the mirrored copy, so RAID 1 can improve read performance. RAID 1 disk array is the highest unit costs, but provides high data security and availability. When a disk fails, the system can automatically switch to the reader the mirror disk failure without data reorganization.

 

 

RAID2 

Hamming code (Hamming Code) check strip is stored. The compartmentalization of data distributed on different hard drives, bar units of bits or bytes, called Hamming code used to provide error checking and recovery. This encoding technique requires more disk storage inspection and recovery information, making the technical implementation of RAID 2 is more complex, rarely used in a commercial environment.

 

RAID3 

Parity (XOR) tape storage, shared parity disk, data strip is stored in bytes. It is very similar with RAID 2, data striping is distributed on different drives, RAID 3 except that the use of a simple parity, and parity information is stored using a single disks. If a disk failure, parity disks and other data disk can be re-generated data; if the parity disk failure did not affect data usage. RAID 3 for large numbers of continuous data transfer rate can provide very good, but for random data, the parity disk will become a bottleneck for write operations.

 

 

Hriaid4 

Parity (XOR) tape storage, shared parity disk, the data storage unit stripe blocks. RAID 4 also compartmentalization of data and distributed on different disks, but bar or recording unit blocks. Use a disk as a RAID 4 parity disks, each write operation requires access parity disk, then parity disk will become a bottleneck for write operations, so RAID 4 is also rarely used in a commercial environment.

 

 

RAID5 

奇偶校验(XOR)条带存储,校验数据分布式存储,数据条带存储单位为块。RAID 5不单独指定的奇偶盘,而是在所有磁盘上交叉地存取数据及奇偶校验信息。在RAID 5上,读/写指针可同时对阵列设备进行操作,提供了更高的数据流量。RAID 5更适合于小数据块和随机读写的数据。RAID 3与RAID 5相比,最主要的区别在于RAID 3每进行一次数据传输就需涉及到所有的阵列盘;而对于RAID 5来说,大部分数据传输只对一块磁盘操作,并可进行并行操作。在RAID 5中有“写损失”,即每一次写操作将产生四个实际的读/写操作,其中两次读旧的数据及奇偶信息,两次写新的数据及奇偶信息。

当进行恢复时,比如我们需要需要恢复下图中的A0,这里就必须需要B0、C0、D0加0 parity才能计算并得出A0,进行数据恢复。所以当有两块盘坏掉的时候,整个RAID的数据失效。

 

RAID6 

奇偶校验(XOR)条带存储,两个分布式存储的校验数据,数据条带存储单位为块。与RAID 5相比,RAID 6增加了第二个独立的奇偶校验信息块。两个独立的奇偶系统使用不同的算法,数据的可靠性非常高,即使两块磁盘同时失效也不会影响数据的使用。但RAID 6需要分配给奇偶校验信息更大的磁盘空间,相对于RAID 5有更大的“写损失”,因此“写性能”非常差。较差的性能和复杂的实施方式使得RAID 6很少得到实际应用。

 

 

RAID7 

这是一种新的RAID标准,其自身带有智能化实时操作系统和用于存储管理的软件工具,可完全独立于主机运行,不占用主机CPU资源。RAID 7可以看作是一种存储计算机(Storage Computer),它与其他RAID标准有明显区别。

RAID 7等级是至今为止,理论上性能最高的RAID模式,因为它从组建方式上就已经和以往的方式有了重大的不同。基本成形式见图,以往一个硬盘是一个组成阵列的“柱子”,而在RAID 7中,多个硬盘组成一个“柱子”,它们都有各自的通道,也正因为如此,你可以把这个图分解成一个个硬盘连接在主通道上,只是比以前的等级更为细分了。这样做的好处就是在读/写某一区域的数据时,可以迅速定位,而不会因为以往因单个硬盘的限制同一时间只能访问该数据区的一部分,在RAID 7中,以前的单个硬盘相当于分割成多个独立的硬盘,有自己的读写通道。

 

RAID10RAID01的比较 

- RAID10是先做镜象,然后再做条带。

- RAID01则是先做条带,然后再做镜象。

比如以6个盘为例,RAID10就是先将盘分成3组镜象,然后再对这3个RAID1做条带。RAID01则是先利用3块盘做RAID0,然后将另外3块盘做为RAID0的镜象。下面以4块盘为例来介绍安全性方面的差别:

1、RAID10的情况 

这种情况中,我们假设当DISK0损坏时,在剩下的3块盘中,只有当DISK1一个盘发生故障时,才会导致整个RAID失效,我们可简单计算故障率为1/3。

 

2、RAID01的情况

这种情况下,我们仍然假设DISK0损坏,这时左边的条带将无法读取。在剩下的3块盘中,只要DISK2,DISK3两个盘中任何一个损坏,都会导致整个RAID失效,我们可简单计算故障率为2/3。

 

因此RAID10比RAID01在安全性方面要强。

从数据存储的逻辑位置来看,在正常的情况下RAID01和RAID10是完全一样的,而且每一个读写操作所产生的IO数量也是一样的,所以在读写性能上两者没什么区别。而当有磁盘出现故障时,比如前面假设的DISK0损坏时,我们也可以发现,这两种情况下,在读的性能上面也将不同,RAID10的读性能将优于RAID01。

Guess you like

Origin www.cnblogs.com/itplay/p/11102249.html