From owner-freebsd-fs@freebsd.org Wed Aug 23 18:08:55 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB544DEC6F5 for ; Wed, 23 Aug 2017 18:08:55 +0000 (UTC) (envelope-from cross+freebsd@distal.com) Received: from hydra.pix.net (hydra.pix.net [IPv6:2001:470:e254::4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.pix.net", Issuer "Pix.Com Technologies LLC CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 985427D6EF for ; Wed, 23 Aug 2017 18:08:55 +0000 (UTC) (envelope-from cross+freebsd@distal.com) Received: from mail.distal.com (mail.distal.com [IPv6:2001:470:e24c:200:0:0:0:ae25]) (authenticated bits=0) by hydra.pix.net (8.16.0.19/8.15.2) with ESMTPSA id v7NI8Y3C098994 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 23 Aug 2017 14:08:42 -0400 (EDT) (envelope-from cross+freebsd@distal.com) Received: from rtp-vpn1-299.cisco.com ([173.38.117.88]) (authenticated bits=0) by mail.distal.com (8.15.2/8.15.2) with ESMTPSA id v7NI8WGx068448 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 23 Aug 2017 14:08:33 -0400 (EDT) (envelope-from cross+freebsd@distal.com) From: Chris Ross Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_82DA429E-BFB5-4362-82E7-AAC6D0939E51"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: zfs import from old TXG Date: Wed, 23 Aug 2017 14:08:17 -0400 In-Reply-To: <1d3771a3-9c3a-1af9-9c48-032a01629630@b1t.name> Cc: freebsd-fs@freebsd.org To: Volodymyr Kostyrko References: <3408A832-BF2E-4525-9EAC-40979BA3555B@distal.com> <20170813000323.GC95431@server.rulingia.com> <5B508AED-4DAC-42E4-8C56-4619C0D1A1C6@distal.com> <035BFBCB-BA43-4568-89E9-8E8DCDFAA8CA@kraus-haus.org> <928F1F16-0777-4D66-BD27-8224DF80363C@distal.com> <06EEEF86-E466-44EA-86F1-866DA32DD92D@kraus-haus.org> <1d3771a3-9c3a-1af9-9c48-032a01629630@b1t.name> X-Mailer: Apple Mail (2.3273) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (mail.distal.com [206.138.151.250]); Wed, 23 Aug 2017 14:08:33 -0400 (EDT) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Aug 2017 18:08:56 -0000 --Apple-Mail=_82DA429E-BFB5-4362-82E7-AAC6D0939E51 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Aug 13, 2017, at 09:54, Volodymyr Kostyrko wrote: >=20 > Paul Kraus wrote: >=20 >> Using zdb you can examine the TXGs and there is a way to force an = import to a certain TXG (at least under Illumos there is, I assume the = FBSD ZFS code is the same). I do not remember the specific procedure, = but it went by on one of the ZFS mailing lists a few years ago. The goal = at the time was not to deal with a changed pool configuration but a = series of writes that corrupted something (possibly due to a feature = being turned on at a certain point in time). You would lose all data = written after the TXG you force the import to. >>=20 >> Looking at the manpages for zpool and zdb, it looks like doing this = has gotten easier with `zdb -e -F` =E2=80=A6 operate on exported pool = and rollback TXG until the pool is importable =E2=80=A6 but I=E2=80=99m = sure there are limits :-) >=20 > That's -T, it was intentionally left undocumented. >=20 > /usr/src/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c /starting txg Looking back at this, and trying to recover some data without = multi-day clean/restore cycles. I want to import my pool to an earlier = txg. I used zfs history to log the actions, and am trying to use = =E2=80=9Czpool import -N [-F] -T 7428 tank=E2=80=9D. With or without a = -F argument, I get: cannot import 'tank': one or more devices is currently unavailable However, zpool import shows all of its devices ONLINE, and I only = exported it a short while ago. Is there something I=E2=80=99m missing = that I can provide to proceed with effectively importing an earlier = state of this pool? Thanks=E2=80=A6 - Chris --Apple-Mail=_82DA429E-BFB5-4362-82E7-AAC6D0939E51 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJZncSWAAoJEPFBDnXvoNg0DXAP/RDDjmCCOR1/5sz4hFBU6js+ B9s7qjj3bM594mR+4YDl6sW9cvHujiLUrxGgLoh7aLlvk8FOm1C6OY+5zT9Ibu2+ aSF4qWUnYi5wakXHXltHt4EJ0OBwsB+r3LjGN2dt7ZAR8FbpoFOY1vU5lCfqkLGp cK+g5chM5hOnA576TJaTELaqHee5/4LkdYgBGdsT+t3wE0jvNDdzT/GHzqsb4EId tw35PLvt2ZpnW5Ei3MJ2mpY5aALIqBv5+uPGGAGbAtCPfmeUZWXL8cCa8B77hU79 2estIhB8N6lWlkMDrkZyxI8Ah5ZhD2SJ66IQexYApuimjDRl59SUSXuOBq2WqDy5 OYQXivjDkMlOMhXRHiAewdBFfajJSown7biSdgXLwt0bfWhKELo3aUv/FinH6ZnF 45jEZH7FHacXbfYAkf7r5rl8I0Se01xUil5snEZ68SMwXG/sCq9ERp4Sogoa0bD5 itA6YzcDHAEvyAr5an+HHUH+jkdhQx8wOwMrIJdXdtS70nBYqNgbFG4tNuKDpO1l Ix9qZmNePIcsoKBb177FCiCwZ8tAiVBnRommuSyuwXw00eUco9X6WqRaSpMCDuKA Fe8jN3kSgQlBsJNOD98JJLVtykHKsv/mq+kXp3iuupzO9KzBKCzREJisrgmgL2/0 tT1JhuvVKi+uyH50BwvT =zuKH -----END PGP SIGNATURE----- --Apple-Mail=_82DA429E-BFB5-4362-82E7-AAC6D0939E51--