From owner-freebsd-fs@FreeBSD.ORG Wed Aug 21 14:31:11 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9EEB98C1 for ; Wed, 21 Aug 2013 14:31:11 +0000 (UTC) (envelope-from outbackdingo@gmail.com) Received: from mail-oa0-x22b.google.com (mail-oa0-x22b.google.com [IPv6:2607:f8b0:4003:c02::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 68E742FB7 for ; Wed, 21 Aug 2013 14:31:11 +0000 (UTC) Received: by mail-oa0-f43.google.com with SMTP id i10so1001666oag.30 for ; Wed, 21 Aug 2013 07:31:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=x1iLqFgYZ1Ydrc1f14vQKSwMTTx/rL5xqVOQYrPiPD0=; b=XsOG7TOZl3EXOeNX+Ir5HR1SKRUNN4Bm/+uWSo/C8Lphtq3bsGCcFIHLG9oLWV3YKD 7cvx/iraZYPl2gBse6N20gJah7G6RtTMUyFDDE8js2lMH3/Holm9USgUuxwmGOyh6vpo iBErUtpLTwoO/nsgfvuzckE3O8KdmC/CMcN+LdUtcWQeLCzDqeh3aof0+j+NEBwk7T2m tn9HxZoOYSCLDfTvitbSMe9yKOoUmDkcdNnzggkDHDHn1iVwjYo1H1ibhBzvFHj9bk7Q t9jD5cwa3p4S07eOmIrxqq4CyZwM4N2uN0byI+JOuWb8DPuyNVUx33DcXwyvU1wAJfD4 m92g== MIME-Version: 1.0 X-Received: by 10.182.101.198 with SMTP id fi6mr2704595obb.79.1377095470653; Wed, 21 Aug 2013 07:31:10 -0700 (PDT) Received: by 10.76.2.110 with HTTP; Wed, 21 Aug 2013 07:31:10 -0700 (PDT) In-Reply-To: <5214CB21.8080206@platinum.linux.pl> References: <1377015858.1450.3.camel@localhost> <1377026509.1478.3.camel@localhost> <5214CB21.8080206@platinum.linux.pl> Date: Wed, 21 Aug 2013 10:31:10 -0400 Message-ID: Subject: Re: How do we clear a bogus zpool? From: Outback Dingo To: Adam Nowacki Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-fs@freebsd.org 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:31:11 -0000 On Wed, Aug 21, 2013 at 10:13 AM, Adam Nowacki wrote: > 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' > > nice snippet, now output that to a variable and then for disk in /dev/$c; do dd if=/dev/zero of=${disk} bs=512 count=1; dd if=/dev/zero of=${disk} bs=512 seek=$(( $(diskinfo -v ${disk} | grep "mediasize in sectors" | awk '{ print $1 }') - 1 )); done and that will nuke them clean This should list all devices with zfs labels. > > ______________________________**_________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/**mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@**freebsd.org > " >