From owner-freebsd-fs@FreeBSD.ORG Wed Apr 17 18:05:09 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 71D3642B for ; Wed, 17 Apr 2013 18:05:09 +0000 (UTC) (envelope-from zaphod@berentweb.com) Received: from sam.nabble.com (sam.nabble.com [216.139.236.26]) by mx1.freebsd.org (Postfix) with ESMTP id 5A93EA1F for ; Wed, 17 Apr 2013 18:05:08 +0000 (UTC) Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1USWjD-0001X1-RF for freebsd-fs@freebsd.org; Wed, 17 Apr 2013 11:05:07 -0700 Date: Wed, 17 Apr 2013 11:05:07 -0700 (PDT) From: Beeblebrox To: freebsd-fs@freebsd.org Message-ID: <1366221907838-5804517.post@n5.nabble.com> Subject: [ZFS] recover destroyed zpool with ZDB MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2013 18:05:09 -0000 I destroyed my zpool but forgot to take the tar backup of /home folder. This was a single-HDD pool and I first did 'zpool destroy' then 'gpart destroy' before realizing my error. Since then, I have manually re-created the GPT partitions to the size they were (testdisk did not correctly identify the geom) and there have been no writes to the HDD. After a lengthly discussion here: http://freebsd.1045724.n5.nabble.com/ZFS-recover-destroyed-zpool-what-are-the-available-options-td5800299.html and getting no result with: # zpool import -D -f -R /bsdr -N -F -X 12018916494219117471 rescue => cannot import 'bsdr' as 'rescue': no such pool or dataset. Destroy and re-create the pool from a backup source. I sent an email to an expert and was advised to look into zdb and the -F & -X flags. Good news and bad news there. '# zdb -e -F 12018916494219117471' gives a lot of output but this is conflicting because although there are no errors, %used is showing zero: Traversing all blocks to verify checksums and verify nothing leaked ... No leaks (block sum matches space maps exactly) bp count: 43 bp logical: 357888 avg: 8322 bp physical: 36352 avg: 845 compression: 9.85 bp allocated: 93184 avg: 2167 compression: 3.84 bp deduped: 0 ref>1: 0 deduplication: 1.00 SPA allocated: 93184 used: 0.00% The zdb -F command is giving the internal info for the zpool but it is not importing it, nor does it change the status to importable. What can I read or change in the zdb command to get this to come online? The zdb output is available as a link if needed. Thanks and regards. ----- 10-Current-amd64-using ccache-portstree merged with marcuscom.gnome3 & xorg.devel -- View this message in context: http://freebsd.1045724.n5.nabble.com/ZFS-recover-destroyed-zpool-with-ZDB-tp5804517.html Sent from the freebsd-fs mailing list archive at Nabble.com.