From nobody Fri Sep 17 00:14:42 2021 X-Original-To: freebsd-current@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 94F4917CC0A2 for ; Fri, 17 Sep 2021 00:14:57 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic306-21.consmr.mail.gq1.yahoo.com (sonic306-21.consmr.mail.gq1.yahoo.com [98.137.68.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4H9ZG92GJMz3PNQ for ; Fri, 17 Sep 2021 00:14:57 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1631837690; bh=fCjUbFn+TOudf+6xa9l9GOinMG11XobLkOJxC/0dNB0=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=RYczpoFaFxmjjqDillL7/ImtLlTnbRlSHW32s+ryrO1la5zm/bzjCmUxt/ihGH56xxTa1vWVDQhn9c1yx7432cDrd92wMMBg6TGXLAj6Ez6nd3v+oBR79lI9He5JErfW3zI/NdGB3oVipMs8RJpPBPuG4JKqJ8tKjYYy5eCAVWkP1k6XKnw+p+svJRtUW8W3XPJHEzSwWei5EFKA4SaozhyUwkxbxyXgNkzGpvkILDD9WWnutJyrERnC0bWFjQctJND85Ru/2La34nb0DXzf/ZnEheuZNXifLQO1P8EEOjT2X/RSfUIFX3Sfwx/tu/jIATVJ9uGYJlsLqEGLIkZv+w== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1631837690; bh=ijMOdPePFBu30ufXhHOUcW4Pi8HAqlbKENYFeYyRZjr=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=LQD7CWPbZsHls/34H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dlLoBIrGTWcLcpnh8XjhfLx TBdSFXFrNs8266QNL5LLCUr4I_GCRRuE5qnJJj7tvtV6krqqQmCW4UkvWUvF1AYGj4msDj1B1Uyv oPGlQu.HWK444oucHVuCWZak.WCfqFL.kmk7I34HXFURWuU1sWaXB__usfjPK2_zBsjWabIVmC6Q ch2kIVT4UDo2pPQHNSV926LaAPK1GRPKunGr19mjdFuWtO8Rgbj2WdZHDG3h5MoCCIo2gihBbCzY istVgcnqUkOI7nLEfJaqED7YH8uLut2C0qyMBWrctW6yN6abmNVK3q53FjXHj0kLmcZL1H7GFNYP KqvzVZjNlTC0tpxKaLkGSxbDDVHUIfAWY8LlEeGF9fM7fqaJWMtBbSy7Lin6js7BoFtF2tVNB.nj RYmF8xlJ6iH0uWgDEfrs83nxPWACyFjzCuoLLGw7mRpzslZ5esHILQItaFSGlaHLy6hcIZ7OQYEp ALgH3nSalcPNP742oI7HlpsIrABGr34g9anbmRdXKs4mEiIhJhbPsreGdWk68UhZaa7d1lqfbJW1 2BizUVl39NefI X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.gq1.yahoo.com with HTTP; Fri, 17 Sep 2021 00:14:50 +0000 Received: by kubenode587.mail-prod1.omega.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 73cf60eca9e98b2d61c501cf59364bfe; Fri, 17 Sep 2021 00:14:45 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: zpool import: "The pool cannot be imported due to damaged devices or data" but zpool status -x: "all pools are healthy" and zpool destroy: "no such pool" In-Reply-To: Date: Thu, 16 Sep 2021 17:14:42 -0700 Cc: Alan Somers , freebsd-current Content-Transfer-Encoding: quoted-printable Message-Id: <18C84EC4-D7D6-4288-949B-0157F52C95D2@yahoo.com> References: <37A64EF6-C638-41A6-9304-3C11550B811E@yahoo.com> To: Freddie Cash X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4H9ZG92GJMz3PNQ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Reply-To: marklmi@yahoo.com From: Mark Millard via freebsd-current X-Original-From: Mark Millard X-ThisMailContainsUnwantedMimeParts: N On 2021-Sep-16, at 16:27, Freddie Cash wrote: >=20 > [message chopped and butchered, don't follow the quotes, it's just to = show some bits together from different messages] >=20 > On Thu, Sep 16, 2021 at 3:54 PM Mark Millard via freebsd-current = wrote: > > > For reference, as things now are: > > >=20 > > > # gpart show > > > =3D> 40 937703008 nda0 GPT (447G) > > > 40 532480 1 efi (260M) > > > 532520 2008 - free - (1.0M) > > > 534528 937166848 2 freebsd-zfs (447G) > > > 937701376 1672 - free - (836K) > > > . . . > =20 > > > So you just want to clean nda0p2 in order to reuse it? Do "zpool = labelclear -f /dev/nda0p2" > > >=20 > >>=20 > >> I did not extract and show everything that I'd tried but > >> there were examples of: > >>=20 > >> # zpool labelclear -f /dev/nda0p2 > >> failed to clear label for /dev/nda0p2 >=20 > The start of the problem looked like (console context, > so messages interlaced): >=20 > # zpool create -O compress=3Dlz4 -O atime=3Doff -f -tzopt0 zpopt0 = /dev/nvd0 > GEOM: nda0: the primary GPT table is corrupt or invalid. > GEOM: nda0: using the secondary instead -- recovery strongly advised. > cannot create 'zpopt0': no such pool or dataset > # Sep 16 12:19:31 CA72_4c8G_ZFS ZFS[1111]: vdev problem, zpool=3Dzopt0 = path=3D/dev/nvd0 type=3Dereport.fs.zfs.vdev.open_failed >=20 > The GPT table was okay just prior to the command. > So I recovered it. >=20 > It looks like you're trying to use a disk partition for a ZFS pool = (nda0p2), but then you turn around and use the entire drive (nvd0) for = the pool which clobbers the GPT. I'd not noticed my lack of a "p2" suffix. Thanks. Explains how I got things messed up, with GPT and zfs conflicting. (Too many distractions at the time, I guess.) > You need to be consistent in using partitions for all commands. Yep: dumb typo that I'd not noticed. > You're also mixing up your disk device nodes for the different = commands; while they are just different names for the same thing, it's = best to be consistent. Once I had commands failing, I expectly tried alternatives that I thought should be equivalent in case they were not in some way. Not my normal procedure. > GEOM is built out of layers (or more precisely, "containers" as it = specifies a new start and end point on the disk), which is very = powerful. But it's also very easy to make a mess of things when you = start accessing things outside of the layers. :) And ZFS labelclear = option is the nuclear option that tends to remove everything = ZFS-related, and everything GPT-related; although I've never seen it = used on a partition before, usually just the disk. > Best bet in this situation is to just zero out the entire disk (dd = if=3D/dev/zero of=3D/dev/nda0 bs=3D1M), and start over from scratch. = Create a new GPT. Create new partitions. Use the specific partition = with the "zpool create" command. I ended up writing something less than a full 480 GiByte of writes. It preserved /dev/nda0p1 . =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)