From owner-freebsd-hackers@freebsd.org Mon Jan 30 17:23:29 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 0904ACC7033 for ; Mon, 30 Jan 2017 17:23:29 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (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 DDFD319CE for ; Mon, 30 Jan 2017 17:23:28 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: cbe324e6-e710-11e6-b3c1-c9f38144898e X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id cbe324e6-e710-11e6-b3c1-c9f38144898e; Mon, 30 Jan 2017 17:23:21 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v0UHNK4S013906; Mon, 30 Jan 2017 10:23:20 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1485796999.3017.7.camel@freebsd.org> Subject: Re: How to safely remove rest of GTP? From: Ian Lepore To: "Andrey V. Elsukov" , Warren Block Cc: freebsd-hackers@freebsd.org, Slawa Olhovchenkov Date: Mon, 30 Jan 2017 10:23:19 -0700 In-Reply-To: <1793b0ec-3a86-5c9a-b275-aa93cd9d230e@yandex.ru> References: <20161230124407.GN37118@zxy.spb.ru> <1793b0ec-3a86-5c9a-b275-aa93cd9d230e@yandex.ru> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit 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:23:29 -0000 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  > destroy or recover it. It is impossible to have a corrupted GPT and > some  > other type of partition table in the same time. So, if you use > 'gpart  > destroy' - you want to explicitly destroy it. > 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. -- Ian