[ZFS] recover destroyed zpool with ZDB

Adam Vande More amvandemore at gmail.com
Wed Apr 17 18:53:41 UTC 2013


On Wed, Apr 17, 2013 at 1:05 PM, Beeblebrox <zaphod at berentweb.com> wrote:

> 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:
>

One thing is that you keep using zpool import -D when the pool isn't in a
destroyed state.

-- 
Adam Vande More


More information about the freebsd-fs mailing list