From owner-freebsd-stable@FreeBSD.ORG Fri Jun 14 07:40:38 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 A8D19490 for ; Fri, 14 Jun 2013 07:40:38 +0000 (UTC) (envelope-from florent@peterschmitt.fr) Received: from peterschmitt.fr (peterschmitt.fr [5.135.177.31]) by mx1.freebsd.org (Postfix) with ESMTP id 41F14192B for ; Fri, 14 Jun 2013 07:40:38 +0000 (UTC) Received: from [172.29.180.39] (unknown [194.214.114.46]) by peterschmitt.fr (Postfix) with ESMTPSA id 3C687A148 for ; Fri, 14 Jun 2013 09:40:39 +0200 (CEST) Message-ID: <51BAC94C.6060902@peterschmitt.fr> Date: Fri, 14 Jun 2013 09:42:04 +0200 From: Florent Peterschmitt User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130518 Icedove/17.0.5 MIME-Version: 1.0 To: freebsd-stable@freebsd.org Subject: Re: zpool labelclear destroys GPT data References: <51B9BB14.6020103@gmail.com> <51BA381C.8070900@gmail.com> <51BAC7D1.70208@gmail.com> In-Reply-To: <51BAC7D1.70208@gmail.com> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2FHMQPSPQCCRTBHANWNQH" 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:40:38 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2FHMQPSPQCCRTBHANWNQH Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Le 14/06/2013 09:35, Johan Hendriks a =E9crit : > 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 'zpoo= l >>>> 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 >=20 > 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. I agree with that, I thought too that zpool cleared only ZFS related labels. Thankfully no damage for me because it was in a script that wipe out the entire disk. > regards > Johan Hendriks --=20 Florent Peterschmitt | Please: florent@peterschmitt.fr | * Avoid HTML/RTF in E-mail. +33 (0)6 64 33 97 92 | * Send PDF for documents. http://florent.peterschmitt.fr | Thank you :) ------enig2FHMQPSPQCCRTBHANWNQH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iQEcBAEBAgAGBQJRuslMAAoJEMtO2Sol0IImvvYH/0L6Ozh7aGQ7RKFudUsehA59 rcH62S9xCS8sn96hz6gPVTHpakAmPFAlM2wJTu4t+Jxxy+SQS4fl5Xsbg5cAQ/uh 6w3qiJdMOuQM5lLaqfrV+CuUYt/yUCgYplj4/zqqVJmFbtoyVc/e711ZSHMzAEud UcjreKZ1hiS0k50RbiIRDz3TitbRJtS/axfUcSoKbYnp/QaVZDIrw+jd/O1eeJuJ Bg35wjlyDpMVf43H3b7o7kUIepoK98Ke4ph5WAZGwG0vCIU4eTTDwyOSqsrPn6yA EFu7b6ioV/aRuMVhvEEj+pi73O+PNkfIFlt6Q4euzC51oQ0eRDl/yTChR3LytVk= =QaPV -----END PGP SIGNATURE----- ------enig2FHMQPSPQCCRTBHANWNQH--