2

From a file-system perspective, is data loss ever possible when a drive is idle or being read from, but NOT written to? Assuming you can confirm no user or OS operations are writing to the disk, are there any subtle file-system operations during idle or read processes which can cause data corruption when interrupted (ie power-loss, data-cable unplugged)?

tshepang
  • 12,111
  • 21
  • 91
  • 136
CauselessEffect
  • 415
  • 5
  • 11

1 Answers1

0

Oh, "it all depends"...

The short answer is yes, corruption can occur. The simplest case is where you have a hdd with a 16Mb cache. Programs write to the "controller" and the data ends up in the device cache. Your program thinks it's OK. You then lose power. >some< systems have sufficient capacitor capacity to let this data dribble out but you can still get partial writes.

In my experience, power loss during these delayed writes can also generate media errors due to incomplete ECC updates. Upon rebooting, the HW may detect this and declare that region of the disk (sector/track) to be bad and remap it from the spares.

Some OS's will update file last-access timestamps as file are >read< meaning that while the user is doing purely read-only activities, writes are still occurring to the disk.

MJZ
  • 1,074
  • 6
  • 12
  • Good point about the last-access timestamps. Windows' "thumbs.db" and OSX's ".DS_Store" files are other examples of background OS write operations. For the sake of argument, if we assume none of those operations are going on, are the "delayed writes" to the controller a result of purely reading a disk drive? It makes sense that drive cache would be written during disk reads to act as a buffer, but are you implying when power is lost the ECC could still potentially interpret these partial writes as corrupt sectors? Shouldn't it know the difference between cache written for drive input vs output – CauselessEffect Dec 10 '12 at 18:00