Home -- Michael's Blog :: Just Do IT -- Manuals

17.4. 数据的完整性

T当前磁盘的最后一个问题是它们不太可靠。虽然磁盘驱动器 的可靠性在过去几年有了很大的提高,它们仍然是会损坏的服务器的 最核心组件。当它们发生故障的时候, 结果可能是灾难性的: 替换一个坏的磁盘驱动器,然后恢复数据可能要花费几天时间。

解决这个问题的传统方法是建立镜象 镜象, 在不同的物理硬件上对数据做两个拷贝。 由于RAID 的出现levels, 所以这个技术也被叫做 第一级RAID 或者 RAID-1. 任何写到卷的数据也会被写到镜象上,所 以可以从任何一个拷贝读取数据,如果其中有一个失败了,数据就可以 在其他驱动器上访问到。

镜象有两个问题:

一个 可选的方案采用 parity, 其实现了 RAID 2, 3, 4 和 5. 当然, RAID-5 是最有趣的。 As implemented in Vinum, it is a variant on a striped organization which dedicates one block of each stripe to parity of the other blocks. As implemented by Vinum, a RAID-5 plex is similar to a striped plex, except that it implements RAID-5 by including a parity block in each stripe. As required by RAID-5, the location of this parity block changes from one stripe to the next. The numbers in the data blocks indicate the relative block numbers.

图形 17-3. RAID-5 Organization



Compared to mirroring, RAID-5 has the advantage of requiring significantly less storage space. Read access is similar to that of striped organizations, but write access is significantly slower, approximately 25% of the read performance. If one drive fails, the array can continue to operate in degraded mode: a read from one of the remaining accessible drives continues normally, but a read from the failed drive is recalculated from the corresponding block from all the remaining drives.

Michael's Blog :: Just Do IT -- manuals