From nobody Fri Jan 28 07:58:59 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 9DD12197D3C5 for ; Fri, 28 Jan 2022 07:59:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JlVGJ3yZHz3QlT; Fri, 28 Jan 2022 07:59:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643356744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n1JOzhlKyWkr8ge0eVnEErnrw8GgZMES89meLuiY4rM=; b=RWDWs6YEEy+p2hZBPw899yO2cwfZ1AUORdpvAIUSOsgQHslAz8dBvpen53hVDEF3nsRP8Q +AwiLjG6raWG/LWGQrW5kUnO73J47Mqt/gntVY9+/n1+MuYjBtYDHwpr5yFBJqNw9nD8QR tsADy/etxrxog/PqsdmCsjMLNGGH41OfGYkUI5u6DDmnyz7P5z1PBhBwU0jG7WliIqW0T/ ezrrTMGs1yKuioCRRk8Z90U1nZLQsvSwvFuxgRaCnwko8iXStWncLH0uNmuATwlcT+QYYB VSTHmsUpGg7RMaEWtJ1M+B9BzozybhRyJeolM4Ei+vtuSK6vteya/VIdbeMWDQ== Received: from [192.168.0.88] (unknown [195.64.148.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: avg/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 0C695B664; Fri, 28 Jan 2022 07:59:03 +0000 (UTC) (envelope-from avg@FreeBSD.org) Message-ID: <7c687172-2d07-eb23-a163-658e2a37fc0a@FreeBSD.org> Date: Fri, 28 Jan 2022 09:58:59 +0200 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 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.5.0 Subject: Re: ZFS: How may I get rid of a zpool that has no extant devices? Content-Language: en-US To: David Wolfskill , fs@freebsd.org References: From: Andriy Gapon In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643356744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n1JOzhlKyWkr8ge0eVnEErnrw8GgZMES89meLuiY4rM=; b=Nukb5/yhHYrvmRGgHcK9xI0ke+6qup36TH8zl9hgEuVZr86wCPOLD6Pwjt6dbQOko+mYNr 6zgrncjSuSQQcKI0a43MoVyt9U32S9bTSCgspBrOp6JYqvoxRMitiADNQ8wD79IuoiPhTl 1Rwcl+QgX7d4rihnxOd99jbSL55xeJR1qAe7YuBsc9BSa2SvIyJ1Y+AUj/+vDYV3SKgpv8 JXYafINilWrLS2LvhierRkMQ4UaNnB3HKvKE/sTP1xyEiPky6URTkbE4//AmbPlj6OaBf/ eTydY38B9z5zo/SM5/8XHmBtL1j26Sf+tluYaxVkacnPUhSF92ydsmMEQq2+Bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643356744; a=rsa-sha256; cv=none; b=qx4nqapx4ZgbGLulrvtlkQyWjSIcmvtK4DQPqoxqXN1Q9jG9BBUVpdiyA8EPbNGOQZdOD3 6vJNRhxVXhabxuDsF085iiM8aazU3T/TSDfXXFfu7K2ICqC8vqn53bSn2qz31t4uOYbvKs wQbUQCcScx76WNgS1nBX925Wu84Wk57Z63ahQL8sjjU6e4kk2EUfxX+PzDoQDnuKWrwq6K ae8o+IDwxdwSD+rXlWfKcUcLCd3SsiB6vaiWcyOseyPsgBtqngaen9zBRpC1/Ani2HOPF1 R1iLzG1xHa/8AhietwKF8SBoFM7cshgNdo8fDkmDL3xQRzkAph8JOz2JcqEK0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 28/01/2022 05:51, David Wolfskill wrote: > TL;DR: I had created a "zroot" zpool in an attempt to get a new machine > booting from ZFS. I gave up on that (for reasons that aren't important > for this discussion), sliced and partitioned the first drive (ada0), > then madea raidz1 pool of the remaining 5 drives; the zpool is called > "tank" (which is mostly a poudriere scratchpad). > > Now "tank" seems fine, but "zroot" shows up as (allegedly) "importable" > but UNAVAIL; anything I try to do with it generates some form of > "no such pool" whine. > > How may I make "zroot" disappear? There are two possibilities, either that pool is in zpool.cache or it is in some stale pool label(s) on disks. Depending on the case, the solution would be different. For the zpool.cache case, you can simply remove the file and then regenerate. The other case is more complex. In the past I dealt with it with a careful use of dd. > root@freetest:/boot # zfs list > NAME USED AVAIL REFER MOUNTPOINT > tank 30.6G 3.57T 12.6G /tank > tank/poudriere 17.8G 3.57T 17.8G /tank/poudriere > root@freetest:/boot # zpool status > pool: tank > state: ONLINE > scan: none requested > config: > > NAME STATE READ WRITE CKSUM > tank ONLINE 0 0 0 > raidz1-0 ONLINE 0 0 0 > ada1 ONLINE 0 0 0 > ada2 ONLINE 0 0 0 > ada3 ONLINE 0 0 0 > ada4 ONLINE 0 0 0 > ada5 ONLINE 0 0 0 > > errors: No known data errors > root@freetest:/boot # zpool import > pool: zroot > id: 16397883415809375312 > state: UNAVAIL > status: One or more devices are missing from the system. > action: The pool cannot be imported. Attach the missing > devices and try again. > see: http://illumos.org/msg/ZFS-8000-3C > config: > > zroot UNAVAIL insufficient replicas > raidz1-0 UNAVAIL insufficient replicas > 6484790396862720571 UNAVAIL cannot open > 14408271149544307738 UNAVAIL cannot open > 2973420537959971822 UNAVAIL cannot open > 17206168682675537956 UNAVAIL cannot open > 16237056652067533889 UNAVAIL cannot open > root@freetest:/boot # zpool destroy zroot > cannot open 'zroot': no such pool > > I am willing to back up tank, destroy the whole mess, and restore it; > the machine is still in its 'shakedown" phase, and is destined to become > my new build machine (so it should spend most of its time powered off). > > That said, if there's a (sane) way to clean this up without the backup/ > restore, I'd appreciate knowing about it. > > Thanks! > > Peace, > david -- Andriy Gapon