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.

  • I'm not sure how this is a security question. Is there a security angle you are worried about?
    – schroeder
    Oct 16 '16 at 20:43
  • @schroeder Thanks for your interest in the question. Yes, it relates to a secure erase implementation.
    – Peter M.
    Oct 16 '16 at 20:59
  • If an algorithm is attempting to overwrite a series of clusters, and meanwhile one of the clusters gets written by another process on the system - has the cluster been fully overwritten or potentially just partially?
    – Peter M.
    Oct 16 '16 at 21:03
  • Ok, I get you, but your core question is not a security question. You intend to use the answer for security purposes, but the question itself is not a security question.
    – schroeder
    Oct 16 '16 at 21:18
  • Should this question be asked elsewhere on the Stack Exchange network instead? If so, where?
    – Peter M.
    Oct 16 '16 at 21:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.