From owner-freebsd-hackers@freebsd.org Fri Dec 30 17:09:33 2016 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 463FBC97028 for ; Fri, 30 Dec 2016 17:09:33 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from butcher-nb.yandex.net (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) by mx1.freebsd.org (Postfix) with ESMTP id 8B6251DE8; Fri, 30 Dec 2016 17:09:32 +0000 (UTC) (envelope-from ae@FreeBSD.org) Subject: Re: How to safely remove rest of GTP? To: Slawa Olhovchenkov References: <20161230124407.GN37118@zxy.spb.ru> <20161230164652.GO37118@zxy.spb.ru> Cc: freebsd-hackers@freebsd.org From: "Andrey V. Elsukov" Message-ID: <22d5dece-f14b-3bef-b3dd-8bb6226e0d28@FreeBSD.org> Date: Fri, 30 Dec 2016 20:08:55 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161230164652.GO37118@zxy.spb.ru> 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: Fri, 30 Dec 2016 17:09:33 -0000 On 30.12.2016 19:46, Slawa Olhovchenkov wrote: > On Fri, Dec 30, 2016 at 07:28:19PM +0300, Andrey V. Elsukov wrote: > >> On 30.12.2016 15:44, Slawa Olhovchenkov wrote: >>> How to safely remove rest of GPT? >>> Disk have actual data (part of ZFS), I am don't need to destroy this >>> data. >>> >>> 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 :) > > What purpose of this patch? In case when you have not valid primary header, `gpart destroy` will not touch first two sectors. In you case you can wipe only last sector, like Ian suggested, but use 'gpart destroy -F da6' instead of dd. -- WBR, Andrey V. Elsukov