Forcing a full file read in ZFS even when checksum error encountered

Artem Belevich art at freebsd.org
Tue Jul 12 17:35:55 UTC 2011


On Tue, Jul 12, 2011 at 5:21 AM, Steven Hartland
<killing at multiplay.co.uk> wrote:
> I was wondering if anyone found a solution to the following thread
> posted back in 2008.
> http://lists.freebsd.org/pipermail/freebsd-fs/2008-February/004269.html
>
> I have a volume here which has a jpg reporting a checksum error
> which refuses to read with cp giving a "Bad Address".
>
> Being a jpg is highly likely that a simple error will be recoverable
> if I can read the data off.
>
> I'm also interested to see if this is an error or just a false
> positive.

Chances are that *is* an error somewhere. It could be HDD or bad
RAM(at the time the write happened) or bad cabling, but the error is
probably there.

>
> Has anyone found a solution to this?

Maybe. See here:
http://blogs.oracle.com/relling/entry/holy_smokes_a_holey_file

Using that method you still would not get the bad block, but you may
be able to recover data beyond it.

If you really want to get access to the data that ZFS considers to be
corrupted, you need to get close and personal with zdb.
This blog post may be a good starting point: http://cuddletech.com/blog/?p=407

--Artem


More information about the freebsd-fs mailing list