From nobody Fri Jan 28 17:23:24 2022 X-Original-To: fs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 39BD219840E4 for ; Fri, 28 Jan 2022 17:23:28 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from mx.catwhisker.org (mx.catwhisker.org [107.204.234.170]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4JlknV6Lwjz4S7s for ; Fri, 28 Jan 2022 17:23:26 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.16.1/8.15.2) with ESMTP id 20SHNPHc078740; Fri, 28 Jan 2022 17:23:25 GMT (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.16.1/8.16.1/Submit) id 20SHNOKo078739; Fri, 28 Jan 2022 09:23:24 -0800 (PST) (envelope-from david) Date: Fri, 28 Jan 2022 09:23:24 -0800 From: David Wolfskill To: Freddie Cash Cc: fs@freebsd.org Subject: Re: ZFS: How may I get rid of a zpool that has no extant devices? Message-ID: References: List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="8ExO1aCOttY/ZX/m" Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4JlknV6Lwjz4S7s X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of david@catwhisker.org designates 107.204.234.170 as permitted sender) smtp.mailfrom=david@catwhisker.org X-Spamd-Result: default: False [-4.40 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FREEFALL_USER(0.00)[david]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:107.204.234.170:c]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[catwhisker.org]; SIGNED_PGP(-2.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[fs]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:7018, ipnet:107.192.0.0/12, country:US]; SUBJECT_ENDS_QUESTION(1.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --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--