Date: Fri, 28 Jan 2022 09:23:24 -0800 From: David Wolfskill <david@catwhisker.org> To: Freddie Cash <fjwcash@gmail.com> Cc: fs@freebsd.org Subject: Re: ZFS: How may I get rid of a zpool that has no extant devices? Message-ID: <YfQmjIS82cGOPv7G@albert.catwhisker.org> In-Reply-To: <CAOjFWZ5hS_6yg0fioMgwwW5cUKK1fxon0Y8FsK88t=ZmJfbGTw@mail.gmail.com> References: <YfNoJBT%2BxyL54ozb@albert.catwhisker.org> <CAOjFWZ5hS_6yg0fioMgwwW5cUKK1fxon0Y8FsK88t=ZmJfbGTw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--8ExO1aCOttY/ZX/m Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 28, 2022 at 09:06:59AM -0800, Freddie Cash wrote: > ... > Did you do a "zpool destroy zroot" before partitioning the devices for use > in the tank pool? If not, that's why it thinks the zroot pool is still > "available" as it sees the old ZFS label on the devices. Right; I had not (run "zfs destroy zroot") -- I think. (This was within the installer -- first time I had used the installer in years...) > ...=20 > > How may I make "zroot" disappear? > ... > If nothing else works, the nuclear option is to run "zpool labelclear" on > each of the devices used for the zroot pool. That will remove the ZFS > label from the disks, clear the GPT partition table and backup table, and > render the device essentially "unformatted", ready for use. I have (since) determined (using "zdb -l") that th eonly vestige of zroot is on /dev/ada0. > As you aren't using ZFS on ada0, you might be able to run "zpool > labelclear" on just that device to make it disappear, as you have proper > ZFS labels on the other drives for tank. > ..... OK; thanks. Success: freetest(12.3-S)[22] sudo zpool labelclear /dev/ada0 failed to open /dev/ada0: Operation not permitted freetest(12.3-S)[23] sysctl kern.geom.debugflags kern.geom.debugflags: 0 freetest(12.3-S)[24] sudo !!=3D16 sudo sysctl kern.geom.debugflags=3D16 kern.geom.debugflags: 0 -> 16 freetest(12.3-S)[25] sudo zpool labelclear /dev/ada0 use '-f' to override the following error: /dev/ada0 is a member of potentially active pool "zroot" freetest(12.3-S)[26] sudo zpool labelclear -f /dev/ada0 freetest(12.3-S)[27] sudo zpool import freetest(12.3-S)[28] =20 [Caution in case anyone is tempted to do the above: please be careful, especially if you are working with precious data. In my case, it's just a headless build machine that I am still in the process of setting up, so a problem would have been annoying, but hardly a catastrophe.] Peace, david --=20 David H. Wolfskill david@catwhisker.org Republican Senators had two chances to hold Donald Trump accountable for his malfeasance in office during his term -- and utterly failed. See https://www.catwhisker.org/~david/publickey.gpg for my public key. --8ExO1aCOttY/ZX/m Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iNUEARYKAH0WIQSr0Kzv+UJRY3wfOii0+6PfV4Ix1AUCYfQmjF8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0QUJE MEFDRUZGOTQyNTE2MzdDMUYzQTI4QjRGQkEzREY1NzgyMzFENAAKCRC0+6PfV4Ix 1FomAP9hmPknTu9jwgGkkbA3ctI93XkaZYJsS1xS00Lvfb1NZgD+MM+fAVKgWBW/ INW+xwDQQXLyrG0jq5x+o6eXK2JNigQ= =M47t -----END PGP SIGNATURE----- --8ExO1aCOttY/ZX/m--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YfQmjIS82cGOPv7G>