Shaochun Wang wrote:
Hi:
Recently I heard of the so called "write hole" problem of raid5 in
Linux software raid. I use ext4 filesystem on my NAS, which assembles
data disks using Linux software raid. So I wonder how safe my such
system!
If the "write hole" is inevitable, will it result in the corruption of
ext4 filesystem?
The write hole occurs if your system crashes during a write operation,
where one stripe gets updated but the other corresponding stripe does
not. This could lead to parity information not matching the
corresponding data.
If the raid 5 system atleast ensures that the data stripe is always
written before parity, then the montly resync check that mdadm does
should be able to detect this and write new parity information.
Atleast this way the bad parity does not lurk around forever on your
raid system causing numerous problems when a disk finally fails.
The write hole is not inevitable, but would require some special
measures at the raid level which could affect performance. And as with
any corruption, it could definitely corrupt your filesystem.
--John
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html