From owner-freebsd-fs@FreeBSD.ORG Wed Aug 21 14:23:54 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3F3A958A for ; Wed, 21 Aug 2013 14:23:54 +0000 (UTC) (envelope-from nowakpl@platinum.linux.pl) Received: from platinum.linux.pl (platinum.edu.pl [81.161.192.4]) by mx1.freebsd.org (Postfix) with ESMTP id 00A4E2F3C for ; Wed, 21 Aug 2013 14:23:53 +0000 (UTC) Received: by platinum.linux.pl (Postfix, from userid 87) id 26FEC2BC191; Wed, 21 Aug 2013 16:13:59 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on platinum.linux.pl X-Spam-Level: X-Spam-Status: No, score=-1.3 required=3.0 tests=ALL_TRUSTED,AWL autolearn=disabled version=3.3.2 Received: from [10.255.0.2] (c38-073.client.duna.pl [83.151.38.73]) by platinum.linux.pl (Postfix) with ESMTPA id C93032BC0C4 for ; Wed, 21 Aug 2013 16:13:59 +0200 (CEST) Message-ID: <5214CB21.8080206@platinum.linux.pl> Date: Wed, 21 Aug 2013 16:13:53 +0200 From: Adam Nowacki User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: freebsd-fs@freebsd.org Subject: Re: How do we clear a bogus zpool? References: <1377015858.1450.3.camel@localhost> <1377026509.1478.3.camel@localhost> In-Reply-To: <1377026509.1478.3.camel@localhost> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2013 14:23:54 -0000 On 2013-08-20 21:21, Sean Bruno wrote: > On Tue, 2013-08-20 at 20:28 +0200, Johan Hendriks wrote: >> # zpool import >> pool: zroot >> id: 854190767471294680 >> 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 >> 17925463268209287656 UNAVAIL cannot open >> 11020448220822113890 UNAVAIL corrupted data >> 10143858893287711942 UNAVAIL corrupted data >> 7542790596970715955 UNAVAIL corrupted data >> 10811885036534933813 UNAVAIL corrupted data >> 13343774937261906429 UNAVAIL corrupted data >> >> # zpool destroy -f zroot >> cannot open 'zroot': no such pool >> # zpool clear -F zroot >> cannot open 'zroot': no such pool >> >> >> Sean >> >> >> >> There is a label clear option for zpool # zpool labelclear devicename >> It will wipe ALL labels, and not only zpool/zfs labels. > > > Sure, but which device to pass in as an argument? I'm not sure where > the zpool information is even coming from. > sysctl -b kern.geom.conftxt | sh -c 'while read a b c d; do zdb -l /dev/$c | grep -q version && echo $c; done' This should list all devices with zfs labels.