View Single Post
  #9   (View Single Post)  
Old 6th February 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

A sync(8) at the end of each of each command step will flush any pending write cache buffers to the filesystems. But, a filesystem mounted with the sync option will cause each writes to wait until the drive confirms a pending write operation has completed. That's a huge difference ... in process performance and I/O throughput particularly. Synchronous mounts are not used as a standard practice. Applications that need to ensure data integrity, such as database management systems, typically issue fsync(2) at the point where a transaction needs to be committed.

Of course, having data written to the drive does not ensure it is readable. The drive may not be able to read the sectors written. The drive may have confirmed the write while sectors remain in the drive's write cache. The data written may not be a discrete entity, such as adding sectors to the end of a file but then missing the metadata update that notes the extension. The drive may fail later.

RAID systems may also improve data integrity, by providing redundant write operations. They can also reduce integrity and add risk, and should be used with care. And they are never replacements for backup. A redundant write is written to at least two locations. So are redundant errors.
Reply With Quote