From owner-freebsd-questions@FreeBSD.ORG Mon Mar 10 08:13:12 2014 Return-Path: Delivered-To: freebsd-questions@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 ESMTPS id DCB56E46 for ; Mon, 10 Mar 2014 08:13:12 +0000 (UTC) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com [209.85.215.53]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 663663F5 for ; Mon, 10 Mar 2014 08:13:11 +0000 (UTC) Received: by mail-la0-f53.google.com with SMTP id b8so4423563lan.12 for ; Mon, 10 Mar 2014 01:13:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=40v+m8Gyp6+jZdljv7cEbojrpaSK57TujzSfZJDWE24=; b=LFShoYwrnpd0nB1lXiquRDEiMDl45B7rAd/d6nH4erKmQKYP3PpSInPtdUyPP7vQi7 rfSGb/k7DHErNct2TzAji5k/HUnu0iF2b+XuN76BwNSO7vNkiCd0APIadATxvoKdSSPq VkNd0PDKDj78BdbJPWXx6R8KJe3VKv/ioN6OXrnV4jiZPtNw7Awi4lPdrWY3K8Bfyf57 4m6YBvjKnPWuAHOJ7COL4w7RDSSBjSnzlswP6Ss87y2AwmDpBRHdBk8Ht5eAxF+w86ux 2ANnFSd5lSZDSHWJNMYzj4USubXb/9R918PsnX2UEn3/u3utMz4QT9PiFt135wqTQXhI VB8A== X-Gm-Message-State: ALoCoQk0aTgEY5XsAy9RJRzAMBnUHYukCvs3ZFaaQW43MxAdfrpNKbsdxqFCwMOwxg2Km/CpWkqf MIME-Version: 1.0 X-Received: by 10.112.170.234 with SMTP id ap10mr21006469lbc.23.1394439183684; Mon, 10 Mar 2014 01:13:03 -0700 (PDT) Received: by 10.112.253.227 with HTTP; Mon, 10 Mar 2014 01:13:03 -0700 (PDT) X-Originating-IP: [121.98.161.40] In-Reply-To: <531D7114.2030803@gmail.com> References: <531D7114.2030803@gmail.com> Date: Mon, 10 Mar 2014 21:13:03 +1300 Message-ID: Subject: Re: How to destroy a zpool that can no longer be imported? From: Jonathan Chen To: Johan Hendriks Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Mar 2014 08:13:12 -0000 On 10 March 2014 21:00, Johan Hendriks wrote: > Jonathan Chen schreef: > >> Hi, >> >> While experimenting ZFS, I've ended up with a zpool that can't be >> imported: >> >> 8:41pm# zpool import >> pool: lake >> id: 10528535549827216272 >> 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: >> >> lake UNAVAIL insufficient replicas >> 12490607842175990247 UNAVAIL cannot open >> >> I don't care about the (non-existent) data, but I would like to remove >> the pool entry. The standard way is to import the pool and then >> destory it. However, this pool cannot be import (even with -f) and so >> there doesn't seem to be a way to destroy it. >> >> How do I get rid of this bogus faulted pool? > > > Try zpool labelclear, it will wipe the labels from the disk. > > Be aware that zpool labelclear clears all labels like gimmor, gpart and not > only zpool labels so you will end up with a clean disk !!!! Yeah. I've already tried this: ,9:03pm# zpool labelclear -f 12490607842175990247 Unable to open 12490607842175990247 The pool used to be on ada1, but: ,9:04pm# zpool labelclear -f ada1 Unable to open ada1 Hmm. I looked at /var/log/messages and noticed: Mar 10 20:44:56 osiris kernel: ZFS WARNING: Unable to attach to diskid/DISK-VFK201R2FDB0BX. Mar 10 20:44:57 osiris kernel: ZFS WARNING: Unable to attach to ada1. 9:10pm# zpool labelclear -f /dev/diskid/DISK-VFK201R2FDB0BX 9:10pm# zpool import 9:10pm# Thanks for pointing me in the right direction! Cheers. -- Jonathan Chen