Suppose I have a Windows program that writes to a hard disk. The hard disk has physical sectors of 512 byte length.
These sectors are accessed as clusters of 4 kilobytes each. Therefore, each cluster has 8 sectors.
Suppose I write content to that cluster that will fill it with just 2 kilobytes. So I will reliably fill the first four sectors with the content of my write buffer.
What happens to the final four sectors of the cluster I wrote to, after my write operation?
Do they get overwritten as part of the write operation, or do they remain untouched?
I realize that the answer might be "it depends". I'm mostly interested in some kind of reference information that might describe how the process is guaranteed to work.
It's the kind of thing you can test and make observations about. But it is much more difficult to "prove a negative" (that the back 4 sectors of a cluster can never remain untouched after the write)
I am also interested in other random access storage devices (eg USB flash drive, Virtual Hard Disk, SSD). But even an answer just for a hard disk would be useful.