From owner-freebsd-fs@FreeBSD.ORG Fri Jan 31 11:20:39 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64E87568 for ; Fri, 31 Jan 2014 11:20:39 +0000 (UTC) Received: from mail.crucible.gr (static.106.97.76.144.clients.your-server.de [144.76.97.106]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E219C1558 for ; Fri, 31 Jan 2014 11:20:37 +0000 (UTC) Received: from mail.crucible.gr (unknown [10.0.0.106]) by mail.crucible.gr (Postfix) with ESMTP id 2D70D3766 for ; Fri, 31 Jan 2014 13:11:51 +0200 (EET) Received: by mail.crucible.gr (Postfix, from userid 58) id 1212F3765; Fri, 31 Jan 2014 13:11:51 +0200 (EET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.datalive.gr X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,HTML_MESSAGE autolearn=ham version=3.3.2 Received: from Macintosh.local (unknown [2.84.133.157]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: anastasiadis@datalive.gr) by mail.crucible.gr (Postfix) with ESMTPSA id B0A26375E for ; Fri, 31 Jan 2014 13:11:47 +0200 (EET) Message-ID: <52EB84F3.50602@datalive.gr> Date: Fri, 31 Jan 2014 13:11:47 +0200 From: Antonis Anastasiadis User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: freebsd-fs@freebsd.org Subject: ZFS - Uncompress raw LZ4 data X-Virus-Scanned: ClamAV using ClamSMTP Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Jan 2014 11:20:39 -0000 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