Forcing full file read in ZFS even when checksum error encountered

Joe Peterson joe at skyrush.com
Tue Feb 5 17:39:42 UTC 2008


Dag-Erling Smørgrav wrote:
> A checksum error results from a read error.  Check your drive's SMART
> error log if it has one.  It might not be detectable in a surface scan,
> as the damaged sector will be automatically reassigned if it's written
> to (which ZFS may very well have done)

I've checked SMART - no [unrecoverable] errors and no additional sector
reallocations, and I've done a SeaTools long test - no problems found.

But I do not understand: in zpool status, there are stats on read errors in
addition to checksum errors.  If I understand correctly, a read error would be
the system/HW reporting an error on read, whereas the whole idea of the
checksums in ZFS is to catch errors that are *not* reported as read errors
(i.e. silent bit changes that normal filesystems would never catch).  What I
seem to be seeing is a case in which ZFS says the checksum is wrong.  There
are only counts in the CKSUM col, not the other cols in the status, so I do
not think this is a "read error" - it is ZFS's last line of defense (the
checksum) reporting a mismatch.

In other words, I assume the read would complete if ZFS did not catch the
checksum mismatch, and what I'd like to do is let it complete so I can see for
myself where these bit errors are by comparing the read file to a known good
copy (that I have).  If there are no mismatches, it would mean there is a
metadata error of ZFS bug.

						-Joe


More information about the freebsd-fs mailing list