ZFS - Uncompress raw LZ4 data

Antonis Anastasiadis anastasiadis at datalive.gr
Fri Jan 31 11:20:39 UTC 2014


Hi everyone,

I'm trying to recover a deleted file from a single disk LZ4 compressed
dataset. The pool is in fine condition.

I tried printing the uberblock history via zdb, but the file had been
deleted before the oldest uberblock I could find. So I guess I can't
roll back into that pool state.

The file was very small (90-120 kb) so it should fit in a single ZFS
block. I do not know the deleted block's DVA in order to restore it via
zdb -R. But I have similar files on the disk, so I can get the file header.

As a last resort, I'm thinking going brute force and somehow find all
ZFS blocks (even deleted ones) from the raw partition, decompress the
data and check the binary data for the file header. Is there a tool that
decompresses raw LZ4 data out there? Max Bruning has written a utility
called "zuncompress" but it doesn't support LZ4
(http://mbruning.blogspot.gr/2009/12/zfs-raidz-data-walk.html)

I know 'm shooting in the dark here, but I would appreciate any other
ideas from the ZFS gurus out there.

Thanks,

Antonis Anastasiadis


More information about the freebsd-fs mailing list