From owner-freebsd-stable@FreeBSD.ORG Fri Jun 14 16:16:35 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8B3035FB; Fri, 14 Jun 2013 16:16:35 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: from mail-la0-x229.google.com (mail-la0-x229.google.com [IPv6:2a00:1450:4010:c03::229]) by mx1.freebsd.org (Postfix) with ESMTP id DB1661945; Fri, 14 Jun 2013 16:16:34 +0000 (UTC) Received: by mail-la0-f41.google.com with SMTP id fn20so708371lab.14 for ; Fri, 14 Jun 2013 09:16:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=ferT8RS1gkcDq0Dmo5+lUSS0At2tuU6NIZDZBkd4C8I=; b=y5d1Ltrn/k81gK+AqFaLoHWSCU41Rf0WsW6F0gaXJ5tXMjkP2AS7fs7iaIuqtSBy3n JKVZaUvvBw7SYM1fCppINCTntcq9wHTR3dZwxg9CPdC2Phd1TE4q0XDkuPxVJKUVGJF0 SziiRyB5EQko1nRKMjuqu0SRP6k4Zn3SupGjAfh6aLF+WBH/Vl09ltnifKM21121t6ku KUv87oOzbJM7v6H9/BJVdOLqGjjfnWyvhzMYzJFd58aCr/95oGMlIowCeavUPJSoqk7C Jkjhh095KjZD6puHGByXTx0aZXLC7DRmfTbHkWzS+WkggkZyNzMx/XnBzgvluumk8KC4 KIPQ== MIME-Version: 1.0 X-Received: by 10.112.201.10 with SMTP id jw10mr1421380lbc.58.1371226593819; Fri, 14 Jun 2013 09:16:33 -0700 (PDT) Received: by 10.112.201.41 with HTTP; Fri, 14 Jun 2013 09:16:33 -0700 (PDT) In-Reply-To: <201306141149.14768.jhb@freebsd.org> References: <51B9BB14.6020103@gmail.com> <201306141149.14768.jhb@freebsd.org> Date: Fri, 14 Jun 2013 17:16:33 +0100 Message-ID: Subject: Re: zpool labelclear destroys GPT data From: Tom Evans To: John Baldwin Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Johan Hendriks , Kimmo Paasiala , freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2013 16:16:35 -0000 On Fri, Jun 14, 2013 at 4:49 PM, John Baldwin wrote: > Well, you could have zpool check if there is a valid ZFS label and prompt= /warn > if it doesn't find one on whatever device it's about to wipe. That doesn= 't > fix the gmirror/gpt case, but it might make zpool more intuitive to use. One of the uses of zpool labelclear is to completely wipe the portions of the disk that ZFS will look at for label information. There is no pre-condition, the post-condition is that the label areas of the supplied device will be cleared. The aim of the command is that the relevant parts of the device are cleared, regardless of its content, such that they are ready to use as pristine disks in a vdev. I suppose if labelclear was made to check for the existence of a pre-existing ZFS label, the force flag could be used to force the change=E2=80=A6 I still don't like it, the command is not called labelclear-only-if-the-label-area-already-has-sane-data. Cheers Tom