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

Thomas Vogt freebsdlists at bsdunix.ch
Wed Jul 13 15:06:49 UTC 2011


Hi Steven

On Jul 13, 2011, at 12:01 PM, Steven Hartland wrote:

> ----- Original Message ----- From: "Artem Belevich" <art at freebsd.org>
>> 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
> 
> Perfect, thanks Artem.
> 
> For the record using the following zdb commands I've managed to get the
> file data off the pool.
> 
> 1. zdb -dddd <pool>/<dataset> (find the objectid by searching for the
> filename)
> 2. zdb -ddddd <pool>/<dataset> <objectid> (find the indirect blocks, the
> third block of hex)
> 3. zdb -R <pool>:<indirect blocks> 2>/tmp/filedata
> 
> e.g.
> zdb -dddd tank/usr
> zdb -ddddd tank/usr 1243
> zdb -R tank:0:22df120000:18000:r 2>corrupt.jpg

Which ZFS version do you have?  zdb core dumps on all my ZFS 28 with 8-Stable if i use multiple -dd options. 

Regards,
Thomas 



More information about the freebsd-fs mailing list