From owner-freebsd-fs@FreeBSD.ORG Fri Jan 31 18:53:23 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 BFF6215F for ; Fri, 31 Jan 2014 18:53:23 +0000 (UTC) Received: from platinum.linux.pl (platinum.edu.pl [81.161.192.4]) by mx1.freebsd.org (Postfix) with ESMTP id 7F2001EAE for ; Fri, 31 Jan 2014 18:53:22 +0000 (UTC) Received: by platinum.linux.pl (Postfix, from userid 87) id E217545218E; Fri, 31 Jan 2014 19:46:13 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on platinum.linux.pl X-Spam-Level: X-Spam-Status: No, score=-1.3 required=3.0 tests=ALL_TRUSTED,AWL autolearn=disabled version=3.3.2 Received: from [10.255.0.2] (unknown [83.151.38.73]) by platinum.linux.pl (Postfix) with ESMTPA id D989245218C; Fri, 31 Jan 2014 19:46:07 +0100 (CET) Message-ID: <52EBEF5F.4060100@platinum.linux.pl> Date: Fri, 31 Jan 2014 19:45:51 +0100 From: Adam Nowacki User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Antonis Anastasiadis , freebsd-fs@freebsd.org Subject: Re: ZFS - Uncompress raw LZ4 data References: <52EB84F3.50602@datalive.gr> In-Reply-To: <52EB84F3.50602@datalive.gr> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 18:53:23 -0000 On 2014-01-31 12:11, Antonis Anastasiadis wrote: > 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) You'll find the code to decompress in sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c, LZ4_uncompress_unknownOutputSize. > > I know 'm shooting in the dark here, but I would appreciate any other > ideas from the ZFS gurus out there. > > Thanks, > > Antonis Anastasiadis > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" >