From nobody Thu Sep 16 22:42:09 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 4EF6317BF2EB for ; Thu, 16 Sep 2021 22:42:20 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from www121.sakura.ne.jp (www121.sakura.ne.jp [153.125.133.21]) (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 4H9XCH6bKwz4bjx for ; Thu, 16 Sep 2021 22:42:19 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from kalamity.joker.local (123-48-130-181.area1b.commufa.jp [123.48.130.181]) (authenticated bits=0) by www121.sakura.ne.jp (8.16.1/8.16.1/[SAKURA-WEB]/20201212) with ESMTPA id 18GMg9I4064037; Fri, 17 Sep 2021 07:42:09 +0900 (JST) (envelope-from junchoon@dec.sakura.ne.jp) Date: Fri, 17 Sep 2021 07:42:09 +0900 From: Tomoaki AOKI To: freebsd-current@freebsd.org Cc: marklmi@yahoo.com 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" Message-Id: <20210917074209.7b3b665188af8cdd22b98eef@dec.sakura.ne.jp> In-Reply-To: References: Reply-To: junchoon@dec.sakura.ne.jp Organization: Junchoon corps X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.0) 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4H9XCH6bKwz4bjx X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Thu, 16 Sep 2021 13:01:16 -0700 Mark Millard via freebsd-current wrote: > What do I go about: > > QUOTE > # zpool import > pool: zopt0 > id: 18166787938870325966 > state: FAULTED > status: One or more devices contains corrupted data. > action: The pool cannot be imported due to damaged devices or data. > see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-5E > config: > > zopt0 FAULTED corrupted data > nda0p2 UNAVAIL corrupted data > > # zpool status -x > all pools are healthy > > # zpool destroy zopt0 > cannot open 'zopt0': no such pool > END QUOTE > > (I had attempted to clean out the old zfs context on > the media and delete/replace the 2 freebsd swap > partitions and 1 freebsd-zfs partition, leaving the > efi partition in place. Clearly I did not do everything > require [or something is very wrong]. zopt0 had been > a root-on-ZFS context and would be again. I have a > backup of the context to send/receive once the pool > in the partition is established.) > > For reference, as things now are: > > # gpart show > => 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) > . . . > > (That is not how it looked before I started.) > > # uname -apKU > FreeBSD CA72_4c8G_ZFS 13.0-RELEASE-p4 FreeBSD 13.0-RELEASE-p4 #4 releng/13.0-n244760-940681634ee1-dirty: Mon Aug 30 11:35:45 PDT 2021 root@CA72_16Gp_ZFS:/usr/obj/BUILDs/13_0R-CA72-nodbg-clang/usr/13_0R-src/arm64.aarch64/sys/GENERIC-NODBG-CA72 arm64 aarch64 1300139 1300139 > > I have also tried under: > > # uname -apKU > FreeBSD CA72_4c8G_ZFS 14.0-CURRENT FreeBSD 14.0-CURRENT #12 main-n249019-0637070b5bca-dirty: Tue Aug 31 02:24:20 PDT 2021 root@CA72_16Gp_ZFS:/usr/obj/BUILDs/main-CA72-nodbg-clang/usr/main-src/arm64.aarch64/sys/GENERIC-NODBG-CA72 arm64 aarch64 1400032 1400032 > > after reaching this state. It behaves the same. > > The text presented by: > > https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-5E > > does not deal with what is happening overall. > > === > Mark Millard > marklmi at yahoo.com > ( dsl-only.net went > away in early 2018-Mar) IIRC, zpool (except zpool import) only works with already-imported pool(s). So IIUC, `zpool status` and `zpool destroy` for faulted pool(s) would only works properly if the pool(s) fault after graceful import. *I have root pools only (in different physical drives), so non-root pools can behave differently. -- Tomoaki AOKI