Date: Wed, 23 Aug 2017 14:08:17 -0400 From: Chris Ross <cross+freebsd@distal.com> To: Volodymyr Kostyrko <arcade@b1t.name> Cc: freebsd-fs@freebsd.org Subject: Re: zfs import from old TXG Message-ID: <FAE448FC-9A3F-43EE-8DED-963D51E6E158@distal.com> In-Reply-To: <1d3771a3-9c3a-1af9-9c48-032a01629630@b1t.name> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
> On Aug 13, 2017, at 09:54, Volodymyr Kostyrko <arcade@b1t.name> wrote:
>
> Paul Kraus wrote:
>
>> 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.
>>
>> Looking at the manpages for zpool and zdb, it looks like doing this has gotten easier with `zdb -e -F` … operate on exported pool and rollback TXG until the pool is importable … but I’m sure there are limits :-)
>
> That's -T, it was intentionally left undocumented.
>
> /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 “zpool import -N [-F] -T 7428 tank”. 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’m missing that I can provide to proceed with effectively importing an earlier state of this pool?
Thanks…
- Chris
[-- Attachment #2 --]
-----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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FAE448FC-9A3F-43EE-8DED-963D51E6E158>
