From owner-freebsd-questions@FreeBSD.ORG Sat Jun 14 21:02:56 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAC0F867 for ; Sat, 14 Jun 2014 21:02:55 +0000 (UTC) Received: from sam.nabble.com (sam.nabble.com [216.139.236.26]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBC7F2F3D for ; Sat, 14 Jun 2014 21:02:55 +0000 (UTC) Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1Wvv68-00012m-KR for freebsd-questions@freebsd.org; Sat, 14 Jun 2014 14:02:48 -0700 Date: Sat, 14 Jun 2014 14:02:48 -0700 (PDT) From: Beeblebrox To: freebsd-questions@freebsd.org Message-ID: <1402779768604-5920849.post@n5.nabble.com> In-Reply-To: <5163EFD9.5030907@gmail.com> References: <1365090630957-5801568.post@n5.nabble.com> <1365091829108-5801581.post@n5.nabble.com> <1365092775955-5801588.post@n5.nabble.com> <515E8BDF.9070403@gmail.com> <1365152049024-5801716.post@n5.nabble.com> <515EAABF.6020300@gmail.com> <1365160406005-5801734.post@n5.nabble.com> <51629FAA.1070007@gmail.com> <1365479477617-5802512.post@n5.nabble.com> <5163EFD9.5030907@gmail.com> Subject: Re: [ZFS] recover destroyed zpool - what are the available options? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2014 21:02:56 -0000 This thread comes up on search engines, so it's appropriate to post new results. Current ZFS code is able to import the pool in question without complaint (# zpool import -D -f -R /bsdr -N -F -X 12018916494219117471 rescue) The pool is now named "rescue". Nice output with the history command: #zpool history -il rescue History for 'rescue': 2013-03-30.00:09:06 zpool create -f bsdr ad6p2 [user 0 (root) on mfsbsd:global] 2013-03-30.00:09:06 [internal pool create txg:5] pool spa 28; zfs spa 28; zpl 5; uts mfsbsd 8.2-RELEASE 802000 amd64 [user 0 (root) on mfsbsd] 2013-03-30.00:09:14 zpool destroy bsdr [user 0 (root) on mfsbsd:global] 2013-09-07.08:27:51 [txg:12] open pool version 28; software version 5000/5; uts xxx.xxx 9.2-PRERELEASE 902503 amd64 [on xxx.xxx] 2013-09-07.08:27:51 [txg:14] import pool version 28; software version 5000/5; uts xxx.xxx 9.2-PRERELEASE 902503 amd64 [on xxx.xxx] 2013-09-07.08:27:56 zpool import -D -f -R /mnt -N -F -n -X 12018916494219117471 [user 0 (root) on xxx.xxx] 2013-09-07.08:29:57 zpool export bsdr [user 0 (root) on xxx.xxx] 2013-09-07.11:23:42 [txg:46] open pool version 28; software version 5000/5; uts xxx.xxx 9.2-PRERELEASE 902503 amd64 [on xxx.xxx] 2013-09-07.11:23:43 [txg:48] import pool version 28; software version 5000/5; uts xxx.xxx 9.2-PRERELEASE 902503 amd64 [on xxx.xxx] 2013-09-07.11:23:48 zpool import -f -R /mnt -N -F -n -X bsdr [user 0 (root) on xxx.xxx] 2013-09-07.11:25:12 zpool export bsdr [user 0 (root) on xxx.xxx] 2013-09-07.11:25:30 [txg:72] open pool version 28; software version 5000/5; uts xxx.xxx 9.2-PRERELEASE 902503 amd64 [on xxx.xxx] 2013-09-07.11:25:30 [txg:74] import pool version 28; software version 5000/5; uts xxx.xxx 9.2-PRERELEASE 902503 amd64 [on xxx.xxx] 2013-09-07.11:25:36 zpool import -R /mnt bsdr [user 0 (root) on xxx.xxx] 2013-09-07.11:27:11 zpool destroy bsdr [user 0 (root) on xxx.xxx] 2014-06-14.22:28:26 [txg:104] open pool version 28; software version 5000/5; uts xxx.xxx 11.0-CURRENT 1100022 amd64 [on xxx.xxx] 2014-06-14.22:28:31 [txg:106] import pool version 28; software version 5000/5; uts xxx.xxx 11.0-CURRENT 1100022 amd64 [on xxx.xxx] 2014-06-14.22:28:40 zpool import -D -f -R /bsdr -N -F -X 12018916494219117471 rescue [user 0 (root) on xxx.xxx] 2014-06-14.22:31:36 zpool export rescue [user 0 (root) on xxx.xxx] 2014-06-14.22:37:40 [txg:149] open pool version 28; software version 5000/5; uts xxx.xxx 11.0-CURRENT 1100022 amd64 [on xxx.xxx] 2014-06-14.22:37:46 [txg:151] import pool version 28; software version 5000/5; uts xxx.xxx 11.0-CURRENT 1100022 amd64 [on xxx.xxx] 2014-06-14.22:37:55 zpool import rescue [user 0 (root) on xxx.xxx] 2014-06-14.22:38:26 zpool export rescue [user 0 (root) on xxx.xxx] 2014-06-14.22:39:34 [txg:167] open pool version 28; software version 5000/5; uts xxx.xxx 11.0-CURRENT 1100022 amd64 [on xxx.xxx] 2014-06-14.22:39:40 [txg:169] import pool version 28; software version 5000/5; uts xxx.xxx 11.0-CURRENT 1100022 amd64 [on xxx.xxx] 2014-06-14.22:39:48 zpool import rescue [user 0 (root) on xxx.xxx] PROBLEM: Unfortunately, even though zpool gets mounted 'ls' shows nothing. Therefore, I need to rollback the ZFS history. I have found two options for this: 1. Manual (using history output) 2. This script: http://www.solarisinternals.com/wiki/index.php/ZFS_forensics_scrollback_script There are many other resources, but the above seems to have boiled it down to the essence. On the down side, I modified the script to only list its findings rather than actually do the disk write and ran it. Two hours later script + HDD is still working (I suppose that should be expected). I really have no preference regarding methods other than what is the most simple and direct one, but I choose to ask for input before trying it on the HDD to be rescued. Regards. ----- FreeBSD-11-current_amd64_root-on-zfs_RadeonKMS -- View this message in context: http://freebsd.1045724.n5.nabble.com/ZFS-recover-destroyed-zpool-what-are-the-available-options-tp5800299p5920849.html Sent from the freebsd-questions mailing list archive at Nabble.com.