On Thu, 7 Jan 2010, Anil wrote:
After spending some time reading up on this whole deal with SSD with "caches"
and how they are prone to data losses during power failures, I need some clarifications...
When you guys say "write cache", do you just really mean the on
board cache (for both read AND writes)? Or is there a separate cache
dedicated to writes?
These details are device dependent. Since the amount of data written
back to flash is often larger than (or not perfectly aligned) with a
requested write, it is normal for existing flash content to need to be
read, updated, and then written. These updates could use a different
buffer than buffering of write requests from the host. Regardless, it
is important that the updates are written properly to underlying
flash, particularly since completely-unassociated data may be
re-written.
Also, a lot of disks out there have caches (without
capacitor/batteries), including the SAS drives from Sun. Aren't they
prone to the same exact situation? Just wanted to get this straight,
since SSD+disabling write caches seems to be a big deal now - but
this problem exists even with regular disks w/o SSD.
The problem only exists if the device fails to commit all unwritten
data when a cache flush is requested. There may be a number of write
requests in between cache flush requests. For zfs, the cache flush
requests are needed in order to ensure that the writes corresponding
to a transaction group have been written. If the cache flush is
ignored and the power subsequently fails, then we have many devices
which lack updates for the most recent committed transaction group and
the whole pool may be corrupted.
The only difference with SSD is that it will wear down much quicker
than advertised with write cache disabled.
This may be true.
Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss