Re: ZFS pool export question

From: Alan Somers <>
Date: Mon, 19 Jul 2021 18:06:10 -0600
On Mon, Jul 19, 2021 at 5:58 PM joe mcguckin <> wrote:

> I want to have a disk that I can transfer files between ZFS systems. I
> created a pool with one disk:
> zpool create xfer da9
> Ok, everything seems to be ok. This is a drive that had a GPT label and 1
> freebsd-zfs partition labelled with the drives serial number.
> I want to remove the drive;
> zfs umount /xfer
> zpool export xfer
> Now I get error messages about a damaged and possible unrecoveracle GPT
> label.
> Am I going about this in the right way? I can’t simpply remove the drive
> after unmounting it, then ZFS prints errors about a failed VDEV.
> Help obi-wan…

When you created the pool, you used the whole disk "da9", not the first
partition "da9p1".  So ZFS overwrote the GPT label.  But GPT keeps a backup
label in a location that ZFS didn't overwrite, which is why you now have a
"damaged" GPT label instead of a "nonexistent" one.  If you really want to
have a GPT-formatted disk, you should destroy your pool, recover the label
with "gpart recover da9", then recreate the pool.  Or, you can just forget
about GPT; you don't need it.  To do that, do "gpart destroy -F da9".  That
might also wipe out one of your ZFS labels; I'm not sure.  But like GPT,
ZFS keeps redundant copies of the label.  Oh, it's also unnecessary to do
"zfs umount" each time.  "zpool export" will do that automatically.
Received on Tue Jul 20 2021 - 00:06:10 UTC

Original text of this message