On Wed, Aug 20, 2008 at 08:52:03AM -0700, Gus Wirth wrote:

Consider the cache on the hard drive. One of the boasting points of hard
drive manufacturers is the size of the RAM cache for the drive. What
isn't specified is how that cache behaves under a power loss. Does it
try and write itself to the disk? Does it just dump everything? Even if
the operating system has done a perfect job in syncing memory to disk,
it still hasn't really been written out until the drive itself flushes
its own cache. And you have no control over that.

If you have a modern linux kernel and the drive/controller path
supports write barriers you can do a lot to mitigate losses even with
a large cache.

Basically, a well-designed filesystem inserts write barriers between
certain writes, and the drive will make sure that all writes before
barrier happen before those afterward.  Unfortunately, most of the
filesystems seem to silently just not use barriers if they aren't
present (XFS complains loudly) even though their presence
significantly helps reliability on power loss.

David


--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to