Thread (8 messages) 8 messages, 4 authors, 2010-06-29

Re: RAID5 write hole?

From: John Hendrikx <hidden>
Date: 2010-06-27 10:33:49

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help