SSD Raid-5 Raid-6

15 篇文章 2 订阅

RAID stands for redundant array of independent disks. RAID is a data storage mechanism that uses multiple physical storage disks that are work together as a single virtual drive. Data is spread across all the physical disks. There are several RAID configurations, called RAID levels.

RAID 5 configuration

The definition of a RAID 5 storage system, according to the Storage Networking Industry Association (SNIA) is:

A placement policy using parity-based protection for storing stripes of 'n' logical blocks of data and one logical block of parity across a set of 'n+1' independent storage devices where the parity and data blocks are interleaved across the storage devices. Data stored using this form of RAID is able to survive a single storage device failure without data loss.

In a RAID 5 configuration, data is striped — i.e., split and stored across multiple physical disks. In addition, a special parity block is used for redundancy. For each combination of data blocks in RAID 5, a parity block is calculated and stored. Each individual parity block resides on only one disk; however, parity blocks are stored in a round-robin fashion, distributed equally across all the physical disks.

Example of a RAID 5 configuration. Data and parity blocks are grouped by color to easily identify which parity block is associated with which data blocks.

Considering that data blocks are striped across at least two disks and the parity block is written on a separate disk, we can see that a RAID 5 configuration requires at least 3 physical drives.

RAID0 无冗余容错,只是实现了磁盘阵列存放数据的带状分布,提高了大规模数据访问的性能。

RAID1 镜像容错,在数据写入一个磁盘的时候,同时在另一个磁盘做相应的镜像备份。磁盘利用率低(只有 50%)。

RAID5 奇偶校验,实现了单个磁盘的冗余纠错功能,大大提高了磁盘利用率。

RAID 6 configuration

According to the SNIA, RAID 6 is defined as:

A RAID 6 or RAID Level 6 storage system is a placement policy using parity-based protection that allows stored data to survive any two storage device failures without data loss.

A RAID 6 configuration is similar to RAID 5 in that it uses striping and parity blocks. The difference is that it stores two parity blocks, allowing for extra redundancy so that even if two of the disks fail, information is still recoverable.

RAID6 双重奇偶校验冗余纠错,在 RAID5 P 校验的基础上加入了第二个校验位 Q 。

RAID-6的全称为“IndependentData disks with two independent distributed parity schemes(带有两个独立分布式校验方案的独立数据磁盘)”。

Ap = A1 @ A2 @ A3

Aq = GF(A1) @ GF(A2) @ GF(A3)

注(Intel P+Q双校验RAID-6):

A1~A3 :条带化数据

Ap:P 校验位

Aq:Q 校验位

@:异或操作

GF(A1):对 A1 进行 Galois Field 变换。

当一块磁盘出现数据错误或者丢失的时候,恢复方法同 RAID5,无需使用 Q 校验位。当两块磁盘上的数据同时出现错误或者丢失的时候,利用 P,Q 的生成公式,联立方程组,无论受损的数据是否包括 P 或 Q,总是能够解出损失的两个磁盘的数据。

RAID-6有很多的标准,包括Intel公司的P+Q双校验RAID-6、NetApp公司的双异或RAID-6(也称为RAID-DP)、X-Code编码RAID-6、ZZS编码RAID-6、Park编码RAID-6、EVENODD编码RAID-6等,本节将介绍这些RAID-6的结构。
(91条消息) RAID-6技术详解_raid6_飞哥亡命天涯的博客-CSDN博客

What are RAID 5-5, RAID 5-9, RAID 6-6 and RAID 6-10?

RAID 5-5 means there are 5 physical disks in a RAID 5 configuration. Similarly, RAID 5-9 means data is striped across 9 physical disks in a RAID 5 configuration.

RAID 6-6 means data is striped across 6 disks in a RAID 6 system. There are 4 data segments and 2 parity segments for each stripe. Similarly, RAID 6-10 uses 10 physical disks; there are 8 data segments and 2 parity segments for each stripe.

Redundancy, Fault Tolerance and Parity Blocks

Both RAID 5 and RAID 6 are fault tolerant systems. i.e., data is not lost even when one of the physical disks fails. RAID 5 can tolerate the failure of any one of its physical disks while RAID 6 can survive two concurrent disk failures.

RAID 5 Fault Tolerance

RAID 5 can tolerate the failure of 1 disk. Data and parity information stored on the failed disk can be recalculated using the data stored on the remaining disks.

Technical details on how parity works are outside the scope of this comparison. But put simply, a parity block is computed from all the individual data blocks. If there are n physical disks in the RAID, there will be n-1 data blocks and 1 parity block. If any of the n-1 data blocks goes missing (e.g., if the physical disk that it is stored on fails), all the information of that data block can still be reconstructed using the other n-2 data blocks plus the parity block. If the disk containing the parity block fails, it can be recomputed using all the n-1 data blocks.

What happens when a disk fails in RAID 5?

Not only can data be recovered when one of the disk fails, the RAID 5 system remains operational throughout because data is accessible and reads are possible from a RAID 5 even when one of the drives has failed and is being rebuilt. However, such reads will be slow because part of the data (the part that was on the failed drive) gets computed in real time using the parity block, rather than simply being read from disk.

Fault Tolerance in RAID 6

RAID 6 has better fault tolerance than RAID 5 because RAID 6 can survive the simultaneous failure of 2 of its disks. This comes at the cost of higher redundancy. Since two parity blocks are needed for each data stripe, storage capacity of two RAID 6 disks is spent on fault tolerance.

Space Efficiency in RAID 5 vs. RAID 6

The capacity efficiency of a RAID system is the fraction of the physical storage capacity that can be productively used to store data. It is calculated by taking the disks that are not parity or mirror and dividing them by the total disks in the set.

For a RAID 5 system with n disks, the storage efficiency is (n-1)/n because 1 disk worth of storage is taken up by parity blocks, leaving n-1 disks for data storage.

For a RAID 6 system with n disks, the storage efficiency is (n-2)/n because 2 disks worth of storage is taken up by parity blocks, leaving n-1 disks for data storage.

The picture below compares the storage efficiency of RAID 5 with either 5 or 9 disks, and RAID 6 with either 6 or 10 disks.

A comparison of the storage efficiency of some RAID 5 and RAID 6 configurations with RAID 10. Chart from Dell.

Performance

RAID 5 and RAID 6 both offer fast reads because of striping. Data is read from multiple disks in parallel, which speeds up reads. Write performance is slow, however, due to the overhead of calculating parity information. RAID 6 is a little slower than RAID 5 for write performance.

Pros and Cons

Both RAID 5 and RAID 6 offer fast reads and are hot-swappable, i.e., the system is functional and continues to support reads even when a failed disk is being replaced.

RAID 5 is more common than RAID 6. The advantages of RAID 5 over RAID 6 include:

  • RAID 5 offers a good balance of many features: fault-tolerance (single disk), performance, cost and storage efficiency.
  • Writes are slow with RAID 5 but not as slow as RAID 6.
  • RAID 5 provides higher storage efficiency compared with RAID 6.
  • Potentially faster recovery from failure compared to RAID 6 because of only one parity block.

The disadvantages of RAID 5 are:

  • RAID 6 supports two concurrent disk failures while RAID 5 can only survive a single disk failure at a time.

Applications

RAID 5 provides a healthy balance of efficient storage, decent performance, failure resistance and good security. It is the most popular RAID configuration for enterprise NAS devices and business servers. RAID 5 is ideal for file and application servers that have a limited number of data drives. If the number of physical disks in the RAID is very large, the probability of at least one of them failing is higher. RAID 6 is a better option in such cases where it is important to have a higher degree of fault tolerance.

RAID 5 vs RAID 6 - Comparing Fault Tolerance, Performance, Pros and Cons | Diffen

1、冗余和数据恢复能力

2、读写性能差别

3、硬盘利用率

4、应用场景

  • RAID 5

    RAID 5是RAID 0和RAID 1的折衷方案。RAID 5可以为系统提供数据安全保障,但保障程度要比RAID 1低而硬盘空间利用率要比RAID 1高。RAID 5具有和 RAID 0相近似的数据读取速度,只是多了一个奇偶校验信息,写入数据的速度比对单个硬盘进行写入操作稍慢。同时由于多个数据对应一个奇偶校验信息,RAID 5的硬盘利用率要比RAID 1高,存储成本相对较低。适用于顺序业务较多的场合,例如,视频点播业务、视频监控业务。

  • RAID 6

    RAID 6与RAID 5相比,安全性较高,性能稍差,硬盘利用率较低。RAID 6也适用于顺序业务较多的场合,例如,视频点播业务、视频监控业务。

COW、ROW快照技术原理 - 华为 (huawei.com)

概念

全球网络存储工业协会SNIA(Storage Networking Industry Association)对快照(Snapshot)的定义是:关于指 定数据集合的一个完全可用拷贝,该拷贝包括相应数据在某个时间点(拷贝开始的时间点)的映像。快照可以是其所 表示的数据的一个副本,也可以是数据的一个复制品。按照 SNIA 的定义,快照有全量快照和增量快照两种类型, 其中 又各自使用了不同的快照技术:

  • 全量快照:镜像分离(Split Mirror)。
  • 增量快照:
    • 写时拷贝(Copy-On-Write)
    • 写时重定向(Redirect-On-Write)

全量快照可以参考RAID1理解,创建快照时会生成一个源卷的镜像卷,在读操作时没有任何影响,在写操作时会有两次写入操作,分别是写入源卷与镜像卷。关于增量快照是本文的重点内容,下文将进行详细的介绍。

快照技术的应用

  • 在线恢复数据:快照技术主要能够进行在线数据恢复,当存储设备发生故障或损坏时能够进行即时的数据恢复,将 存储状态恢复到快照时间点的状态。
  • 提供可用副本:快照技术为存储用户提供另外一个数据访问的通道,当源数据进行在线应用处理时,用户可以选择 访问快照数据,还能够将快照应用到测试等工作。

增量快照

华为存储研发的快照称为HyperSnap,华为研发的快照技术主要采用了增量快照(包含COW和ROW两种),下面我 们将介绍这两种快照技术的原理实现。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值