Redundant Array of Independent Disk RAID - redundant array of independent disks

RAID:

RAID stands for Redundant Array of Independent Disks (Redundant Array of Independent Disks), the basic idea is to combine a plurality of disks, a disk array combination group, so that a substantial increase in performance.

RAID is divided into several different levels, various orders were read and write performance and data reliability make different trade-offs. Actual work to select a different RAID solutions according to their business needs.

RAID implementations:

  •  External disk arrays: adaptation capabilities provided by the expansion card;
  • Internal contact type RAID: onboard RAID controller before the OS installation, disposed in the BIOS;
  • Software RAID: implemented by OS;

RAID categories:

RAID0: RAID0 called striping, will each disk, the write data can be processed in parallel fragmentation, therefore N times the write rate of a single disk, there is no redundancy, any damage to a disk will be due to unavailable data.

 

RAID1: RADI1 is mirrored storage, no data check, data is written to the same two or more disks, the write speed is relatively slow, but read faster.

RAID4: RADI4 on the basis of RAID1, N disks for data storage, the additions of a disk as a parity disk. A total of N + 1 disks, one disk broken does not affect any data access.

RAID5: a RAID5 RAID4 basis on a disk to store the original check data, to each disc has a data and parity information.

 

Article bearing a dispersing parity data tape;

raid01: first composition RAID0, then the composition of RAID1.

 

raid10: the first consisting of RAID1, then the RAID0 

raid2:RAID2 称为纠错海明码磁盘阵列,其设计思想是利用海明码实现数据校验冗余。海明码是一种在原始数据中加入若干校验码来进行错误检测和纠正的编码技术,其中第 2n 位( 1, 2, 4, 8, … )是校验码,其他位置是数据码。因此在 RAID2 中,数据按位存储,每块磁盘存储一位数据编码,磁盘数量取决于所设定的数据存储宽度,可由用户设定。图 4 所示的为数据宽度为 4 的 RAID2 ,它需要 4 块数据磁盘和 3 块校验磁盘。如果是 64 位数据宽度,则需要 64 块 数据磁盘和 7 块校验磁盘。可见, RAID2 的数据宽度越大,存储空间利用率越高,但同时需要的磁盘数量也越多。海明码自身具备纠错能力,因此 RAID2 可以在数据发生错误的情况下对纠正错误,保证数据的安全性。它的数据传输性能相当高,设计复杂性要低于后面介绍的 RAID3 、 RAID4 和 RAID5 。但是,海明码的数据冗余开销太大,而且 RAID2 的数据输出性能受阵列中最慢磁盘驱动器的限制。再者,海明码是按位运算, RAID2 数据重建非常耗时。由于这些显著的缺陷,再加上大部分磁盘驱动器本身都具备了纠错功能,因此 RAID2 在实际中很少应用,没有形成商业产品,目前主流存储磁盘阵列均不提供 RAID2 支持。

带有专用位校验的数据条带;

raid4:RAID4 与 RAID3 的原理大致相同,区别在于条带化的方式不同。 RAID4 (图 6 )按照 块的方式来组织数据,写操作只涉及当前数据盘和校验盘两个盘,多个 I/O 请求可以同时得到处理,提高了系统性能。 RAID4 按块存储可以保证单块的完整性,可以避免受到其他磁盘上同条带产生的不利影响。

RAID4 在不同磁盘上的同级数据块同样使用 XOR 校验,结果存储在校验盘中。写入数据时, RAID4 按这种方式把各磁盘上的同级数据的校验值写入校验 盘,读取时进行即时校验。因此,当某块磁盘的数据块损坏, RAID4 可以通过校验值以及其他磁盘上的同级数据块进行数据重建。

RAID4 提供了 非常好的读性能,但单一的校验盘往往成为系统性能的瓶颈。对于写操作, RAID4 只能一个磁盘一个磁盘地写,并且还要写入校验数据,因此写性能比较差。而且随着成员磁盘数量的增加,校验盘的系统瓶颈将更加突出。正是如上这些限制和不足, RAID4 在实际应用中很少见,主流存储产品也很少使用 RAID4 保护。

带有专用块级校验的数据条带;

raid6:前面所述的各个 RAID 等级都只能保护因单个磁盘失效而造成的数据丢失。如果两个磁盘同时发生故障,数据将无法恢复。 RAID6 (如图 8 )引入双重校验的概念,它可以保护阵列中同时出现两个磁盘失效时,阵列仍能够继续工作,不会发生数据丢失。 RAID6 等级是在 RAID5 的基础上为了进一步增强数据保护而设计的一种 RAID 方式,它可以看作是一种扩展的 RAID5 等级。

RAID6 不仅要支持数据的恢复,还要支持校验数据的恢复,因此实现代价很高,控制器的设计也比其他等级更复杂、更昂贵。 RAID6 思想最常见的实现方式是采用两个独立的校验算法,假设称为 P 和 Q ,校验数据可以分别存储在两个不同的校验盘上,或者分散存储在所有成员磁盘中。当两个磁盘同时失效时,即可通过求解两元方程来重建两个磁盘上的数据。

RAID6 具有快速的读取性能、更高的容错能力。但是,它的成本要高于 RAID5 许多,写性能也较差,并有设计和实施非常复杂。因此, RAID6 很少得到实际应用,主要用于对数据安全等级要求非常高的场合。它一般是替代 RAID10 方案的经济性选择。

带有双重分散校验的数据条带

Guess you like

Origin www.linuxidc.com/Linux/2019-08/160091.htm