From owner-freebsd-hackers@freebsd.org Mon Jan 30 17:36:15 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8C61CC74AE for ; Mon, 30 Jan 2017 17:36:15 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8332495 for ; Mon, 30 Jan 2017 17:36:14 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (unknown [10.1.1.2]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id ED01E13C9D for ; Mon, 30 Jan 2017 17:36:12 +0000 (UTC) Subject: Re: How to safely remove rest of GTP? To: freebsd-hackers@freebsd.org References: <20161230124407.GN37118@zxy.spb.ru> <1793b0ec-3a86-5c9a-b275-aa93cd9d230e@yandex.ru> <1485796999.3017.7.camel@freebsd.org> From: Allan Jude Message-ID: <010b109f-1c24-486b-ef3e-6198294731e4@freebsd.org> Date: Mon, 30 Jan 2017 12:36:04 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <1485796999.3017.7.camel@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CNh8nGCR4uUmDbBV7JuBAUnG4XVm6ludS" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 17:36:15 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --CNh8nGCR4uUmDbBV7JuBAUnG4XVm6ludS Content-Type: multipart/mixed; boundary="GX73V1xkNs2VHbgegK4TvcCh2D1higGvu"; protected-headers="v1" From: Allan Jude To: freebsd-hackers@freebsd.org Message-ID: <010b109f-1c24-486b-ef3e-6198294731e4@freebsd.org> Subject: Re: How to safely remove rest of GTP? References: <20161230124407.GN37118@zxy.spb.ru> <1793b0ec-3a86-5c9a-b275-aa93cd9d230e@yandex.ru> <1485796999.3017.7.camel@freebsd.org> In-Reply-To: <1485796999.3017.7.camel@freebsd.org> --GX73V1xkNs2VHbgegK4TvcCh2D1higGvu Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2017-01-30 12:23, Ian Lepore wrote: > On Mon, 2017-01-30 at 19:09 +0300, Andrey V. Elsukov wrote: >> On 30.01.2017 18:55, Warren Block wrote: >>> >>>> >>>>> >>>>> GEOM: da6: the primary GPT table is corrupt or invalid. >>>>> GEOM: da6: using the secondary instead -- recovery strongly >>>>> advised. >>>>> GEOM: da22: the primary GPT table is corrupt or invalid. >>>>> GEOM: da22: using the secondary instead -- recovery strongly >>>>> advised. >>>>> GEOM: da6: the primary GPT table is corrupt or invalid. >>>>> GEOM: da6: using the secondary instead -- recovery strongly >>>>> advised. >>>>> GEOM: da22: the primary GPT table is corrupt or invalid. >>>>> GEOM: da22: using the secondary instead -- recovery strongly >>>>> advised. >>>> You may try attached patch, I did only basic tests, so first try >>>> somewhere :) >>> I really like the idea of gpart being able to remove the secondary >>> GPT, >>> but combining it with the existing destroy command is >>> ambiguous. It's >>> hard for the user to tell what will happen, and the command itself >>> implies that it will destroy all partitioning. >> I don't see any ambiguity here. A user sees corrupted GPT, it can >> only=20 >> destroy or recover it. It is impossible to have a corrupted GPT and >> some=20 >> other type of partition table in the same time. So, if you use >> 'gpart=20 >> destroy' - you want to explicitly destroy it. >> >=20 > The question to ask here is why are you the only one who can't see or > understand that a user is NOT going to use a "destroy" command on a > disk containing live data? Especially given the confusing vagueness > of the gpart docs. >=20 > -- Ian >=20 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.o= rg" >=20 On my todo list for a while, has been a gpart command to clear the first and last 1MB of a disk. To remove whatever happens to be there: MBR, GPT, ZFS Labels, whatever. Just 'nuke it from orbit'. gpart zero ada0 or gpart clear ada0 something to that affect. --=20 Allan Jude --GX73V1xkNs2VHbgegK4TvcCh2D1higGvu-- --CNh8nGCR4uUmDbBV7JuBAUnG4XVm6ludS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJYj3mIAAoJEBmVNT4SmAt+d7oP/1XzFN11xZAjJEb0ADBjwK/Y 8MVRaE0DJaQS2axEmCSfQm3SExktLI8Gd4gC2MRcvGxlP40irRkaYLfIsN9OxwX4 t2YnrKZz4vccFDvaoPR5GWWbioUU1hiWB83siZ83qm27FofOMPyypIxs+gqxSPjh OMF2KyMZqMNgxqgiPEzpSlIOvHFRKEJAani5i+AfK7kd8KIk8xzY5yeymKdPbBXB q/7lYfmGxvhKlpqJflINHe2oxeInrUBoA6s3FNIBsKWFLMD7FKNHR2p/0dduDgTt QmQW+abxrpm7UrsAUScppSSy7ekCJpLpboS4RvjlnaRmFSczdRsuNBKRx196lKwt DV02+TvmbjPzqmWd/jwajZnD6+DXZBcf13DCsxfZzsc+YG076IDSywraAGkw02Uy EFyprZShcPdHSNJwUab+7y2EAf17QzRzMF5EzfbL3y4rEdLjowRHp4zxOkzVyfIJ LtZSIhvzOmePIn+bVzGUZTHV04sXV/gd8kQNVUlXhUD970slvgoY4ml1TrpQWuIp l5ptlCoeLThdz/YRW367hRe0eFzdk5U9tpv3yS0zA1k0nEK1elRYVqefHq9CaU/C xYNLFwtFFnjfOyF6gdF+ds82i1THYiMYgewxCzn8vBs/3M7G0u4AMkq7EsmvdEYz cLfcIXPoK6Jb5rxkduTM =gZgL -----END PGP SIGNATURE----- --CNh8nGCR4uUmDbBV7JuBAUnG4XVm6ludS--