From owner-freebsd-stable@FreeBSD.ORG Fri Jun 14 07:35:46 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1EB7F1E1 for ; Fri, 14 Jun 2013 07:35:46 +0000 (UTC) (envelope-from joh.hendriks@gmail.com) Received: from mail-ea0-x236.google.com (mail-ea0-x236.google.com [IPv6:2a00:1450:4013:c01::236]) by mx1.freebsd.org (Postfix) with ESMTP id AA24718D9 for ; Fri, 14 Jun 2013 07:35:45 +0000 (UTC) Received: by mail-ea0-f182.google.com with SMTP id d10so147992eaj.13 for ; Fri, 14 Jun 2013 00:35:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=QI8lzwQ3Xhfk7l1eKcFxH1geU7dCSGJm8Dyr55PtJjM=; b=OPcl/nY/2KfhOoWnQSW+T1P839jNbuw53/SfrXyKFp3knne8cA8XZYwkZk6CE49EnN 9NQI9yO+5nN5PjfCosvrbG+CnWDdDH0bIxZ0Y5fMy14M4bkvMRiZn20HS5mO7t75DCUi +Hz1HOVR8SE9xynYmshe9nZ59mM7SA752pMq8BuyPGzMssamaQuBM8o/0xH1L7oGEApj x+Xk634oq0Jq6zZzmz/0GE2ANraz16Hj7133ujhDyY7uPdtiquvHG2tsRxgNKSTIPxx2 O8Th0i+QYW+G+vOn0W1V+yl+Fwv+/SxZjcAHp8paCCOnvO5e9z6EM7MdmTTMN5QUNNF+ SLvg== X-Received: by 10.14.99.71 with SMTP id w47mr1440016eef.140.1371195344742; Fri, 14 Jun 2013 00:35:44 -0700 (PDT) Received: from [192.168.1.129] (schavemaker.nl. [213.84.84.186]) by mx.google.com with ESMTPSA id s43sm1657054eem.13.2013.06.14.00.35.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Jun 2013 00:35:44 -0700 (PDT) Message-ID: <51BAC7D1.70208@gmail.com> Date: Fri, 14 Jun 2013 09:35:45 +0200 From: Johan Hendriks User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Kimmo Paasiala Subject: Re: zpool labelclear destroys GPT data References: <51B9BB14.6020103@gmail.com> <51BA381C.8070900@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable 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 07:35:46 -0000 Kimmo Paasiala schreef: > 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 Well as i found out, zpool(8) does not know what it clears. ! :D I think an adjustment to the man page is in order here. The man page clearly state it removes ZFS labels, not GPT, gmirror and glabel labels. It should mention it will remove labels from the disk/device, and that it clears ALL labels. If a user reads the man page it now looks save to use labelclear. I thougt that zpool would know if there was zpool label information on the disk, and if i a case there is no ZFS label information it will tell me that! In my case i did not loose anything, so no big deal but there will proberbly be someone who gets bitten by this. A plus is that i found a new way to clear my disks fast ! ;) regards Johan Hendriks