Date: Mon, 19 Jul 2021 18:06:10 -0600 From: Alan Somers <asomers@freebsd.org> To: joe mcguckin <joe@via.net> Cc: freebsd-fs <freebsd-fs@freebsd.org> Subject: Re: ZFS pool export question Message-ID: <CAOtMX2g0JdL7GFTOAfsk0XN5SQHjYaTNYL7Oh60vE4JE518MGQ@mail.gmail.com> In-Reply-To: <A2BC8B4B-D386-471A-B4C6-FCF758414596@via.net> References: <A2BC8B4B-D386-471A-B4C6-FCF758414596@via.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2g0JdL7GFTOAfsk0XN5SQHjYaTNYL7Oh60vE4JE518MGQ>
