Many resources on the internet contain conflicting information regarding read/write logic for RAID chunks.
This answer contains the following (seemingly conflicting) pieces of information:
A 512 KB chunk size doesn't require system to write e.g. 512 KB for every 4 KB write or to read 512 KB of device surface for a 4 KB application read.
[When reading a 16-KiB block from RAID with a 64-KiB chunk size] the RAID will perform a read/modify/write operation when writing that 4-KiB file/16-KiB block because the RAID's smallest unit of storage is 64-KiB.
On the other hand, this resource contains the following pieces of information:
For example, if you have a 10 KB text file and the chunk size is 256 KB, then that 10 KB of data is stored in a 256 KB block, with the rest of the block left empty. Conversely, with 16 KB chunks, there is much less wasted space when storing that 10 KB file.
In particular, I have the following questions:
- When reading/writing some unit of data smaller than the RAID chunk size using a scheme without parity, does this require a read/modify/write operation for the entire chunk, or only the part of the chunk that is modified?
- When using a RAID scheme with parity, does this change anything in the answer to question 1?
- As alluded to in the second reference, does writing a unit of data smaller than the RAID chunk somehow leave the rest of the RAID chunk empty? This seems incorrect to me, but I wanted to clarify as this resource quite unambiguously states this.
- Do any of these answers change depending on the RAID implementation (Linux kernel, hardware RAID, etc.)?
If possible, providing some sort of authoritative reference (some RAID specification, source code, etc.) would be awesome.
Thanks in advance!