Sir.Robin
Guru
- Joined
- Apr 14, 2012
- Messages
- 554
It's not just because of performance. It is also the result of the variable stripe size. Even if you did not try to move the parity around, writes that are not "aligned to number of data drives" would move the parity to a different drive. I'll use the image from the first blog post:![]()
The A write is "aligned", so the parity is on the last drive (Ap, Ap'). However, the B stripe is smaller so it only uses two data drives and the parity moves to the third drive (Bp). The next stripe (C) is again aligned, but because of B the parity is now on the third drive too.
Yes, the verification happens on all reads. However, you need to understand that checksum and parity are two different things. Checksum is just a hash (single number) that tells you if the block is consistent. The parity is a bigger chunk of data that allows you to actually reconstruct corrupted information. The checksum is stored in the block pointer (parent block) and is used to verify that the read block is OK. Only when the checksum doesn't match ZFS reads the parity and tries to reconstruct the data.
Ahaaa... :) Thanx again!