From owner-freebsd-stable@FreeBSD.ORG Thu Jun 13 21:27:03 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 50279F46 for ; Thu, 13 Jun 2013 21:27:03 +0000 (UTC) (envelope-from kpaasial@gmail.com) Received: from mail-qa0-x234.google.com (mail-qa0-x234.google.com [IPv6:2607:f8b0:400d:c00::234]) by mx1.freebsd.org (Postfix) with ESMTP id 1892013B0 for ; Thu, 13 Jun 2013 21:27:03 +0000 (UTC) Received: by mail-qa0-f52.google.com with SMTP id bv4so1396699qab.11 for ; Thu, 13 Jun 2013 14:27:02 -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=3Ho69LyLgUQlKK/jh+AdqAVqAZ++199582jzA8AbhSE=; b=efGaTPJ9QPnpoMcQr6klEz43Ns3wuKbO/raCjIeZWNg2cG3NMlm7p4W1WS8Kcqj5hX 8hsQulBMhXqFAoxkZfiWz3B6dvD2odtoBnlDen1l/JId24vh2TnJcN0rZTC6v4U6bxq1 +QEXeHKeUWZlg3L9liOe6HcQ73RgObiMjl5A7qG1fqBGtE0LkSvmJbRYSJWLeBqAPMwB fUEzU3aT2Knk2E8XRbs17KCna2YSft5WcgrlVARa5F34JtXYYhh9fSxkt6rnxkNdZd+R py7/KzDOa4ce8ZqtR6ufPGhjm7GaRNFajmxmRpDo5I+YHCyg5fzhwji3SG+4+i7Rh1iF ZcUg== MIME-Version: 1.0 X-Received: by 10.49.104.180 with SMTP id gf20mr3781312qeb.59.1371158822628; Thu, 13 Jun 2013 14:27:02 -0700 (PDT) Received: by 10.224.182.148 with HTTP; Thu, 13 Jun 2013 14:27:02 -0700 (PDT) In-Reply-To: <51BA381C.8070900@gmail.com> References: <51B9BB14.6020103@gmail.com> <51BA381C.8070900@gmail.com> Date: Fri, 14 Jun 2013 00:27:02 +0300 Message-ID: Subject: Re: zpool labelclear destroys GPT data From: Kimmo Paasiala To: Johan Hendriks Content-Type: text/plain; charset=UTF-8 Cc: 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: Thu, 13 Jun 2013 21:27:03 -0000 On Fri, Jun 14, 2013 at 12:22 AM, Johan Hendriks wrote: > Op 13-6-2013 14:40, Kimmo Paasiala schreef: > >> The 'device' can be a partition as well as the whole disk, use 'zpool >> labelclear' on the freebsd-zfs partition instead of the whole disk. >> >> -Kimmo >> >> On Thu, Jun 13, 2013 at 3:29 PM, Johan Hendriks >> wrote: >>> >>> When i use zpool labelclear, it wipes the whole disk including gpt data. >>> So the whole disk is empty and i need to create the gpt partitions again. >>> >>> Is this supposed to work like this? >>> The man page suggests that it only wipes the ZFS metadata. >>> >>> zpool labelclear [-f] device >>> >>> Removes ZFS label information from the specified device. The >>> device >>> must not be part of an active pool configuration. >>> >>> -v Treat exported or foreign devices as inactive. >>> >>> This is on FreeBSD 9.1 stable r251213 memstick install. >>> >>> regards >>> >>> Johan Hendriks >>> Neuteboom Automatisering >>> _______________________________________________ >>> freebsd-stable@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-stable >>> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > > Thanks for your reply. > I will try it on the actual zfs partition. > > But imho it is a bad thing that it destroys the whole disk layout. > It does not remove ZFS label information, it removes ALL label information > on the disk or device you give it > > > regards > Johan Hendriks > Neuteboom Automatisering > Of course, zpool(8) will do exactly what you tell it to do. It does not know about any partitioning schemes and assumes that the user knows that using labelclear on a the whole disk will potentially destroy all data on it including any partitioning information. -Kimmo