From owner-freebsd-hackers@freebsd.org Mon Jan 30 16:10:58 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 17450CC88B2 for ; Mon, 30 Jan 2017 16:10:58 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward2j.cmail.yandex.net (forward2j.cmail.yandex.net [IPv6:2a02:6b8:0:1630::15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BB30DA1B for ; Mon, 30 Jan 2017 16:10:57 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp3h.mail.yandex.net (smtp3h.mail.yandex.net [84.201.186.20]) by forward2j.cmail.yandex.net (Yandex) with ESMTP id 35D7520C11; Mon, 30 Jan 2017 19:10:54 +0300 (MSK) Received: from smtp3h.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3h.mail.yandex.net (Yandex) with ESMTP id 028D5440DCA; Mon, 30 Jan 2017 19:10:52 +0300 (MSK) Received: by smtp3h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id tivjaz2in1-ApjG3RqA; Mon, 30 Jan 2017 19:10:51 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1485792651; bh=i2hk030CGY83NqOxXGt3ClLMmrACf9oYdlf2vNfse9c=; h=Subject:To:References:Cc:From:Message-ID:Date:In-Reply-To; b=hdWygElKG1V4WzTiPGH1wjC95VWa2ACH0sb865363BbgrmZ51YgGZE8nsE2Xa3srv pZBnHjesWIfNN7qXgdwyQF4OEC/7a1OOfuWYSEpLrQEGMRGlLaI9k1IsAh8rT0QtfQ sRxr9fCAwwqFdeEBeh+LcLSEUYD4LFNwnNcoJ5qE= Authentication-Results: smtp3h.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-Suid-Status: 1 0,1 0,1 0 Subject: Re: How to safely remove rest of GTP? To: Warren Block References: <20161230124407.GN37118@zxy.spb.ru> Cc: Slawa Olhovchenkov , freebsd-hackers@freebsd.org From: "Andrey V. Elsukov" Message-ID: <1793b0ec-3a86-5c9a-b275-aa93cd9d230e@yandex.ru> Date: Mon, 30 Jan 2017 19:09:39 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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 16:10:58 -0000 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. -- WBR, Andrey V. Elsukov