[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-fs
Subject: Re: ZFS pool export question
From: Alan Somers <asomers () freebsd ! org>
Date: 2021-07-20 0:06:10
Message-ID: CAOtMX2g0JdL7GFTOAfsk0XN5SQHjYaTNYL7Oh60vE4JE518MGQ () mail ! gmail ! com
[Download RAW message or body]
On Mon, Jul 19, 2021 at 5:58 PM joe mcguckin <joe@via.net> 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.
-Alan
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic