Date: Fri, 30 Dec 2016 20:40:18 +0300 From: Slawa Olhovchenkov <slw@zxy.spb.ru> To: Ian Lepore <ian@freebsd.org> Cc: "Andrey V. Elsukov" <ae@FreeBSD.org>, freebsd-hackers@freebsd.org Subject: Re: How to safely remove rest of GTP? Message-ID: <20161230174018.GP37118@zxy.spb.ru> In-Reply-To: <1483119430.16152.83.camel@freebsd.org> References: <20161230124407.GN37118@zxy.spb.ru> <d79b8568-72e8-415e-4923-14e3c730267e@FreeBSD.org> <20161230164652.GO37118@zxy.spb.ru> <22d5dece-f14b-3bef-b3dd-8bb6226e0d28@FreeBSD.org> <1483119430.16152.83.camel@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Dec 30, 2016 at 10:37:10AM -0700, Ian Lepore wrote: > On Fri, 2016-12-30 at 20:08 +0300, Andrey V. Elsukov wrote: > > 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. > > > > If you gpart destroy -F da6 won't that also clear the valid MBR at the > start of the disk? šI think Slawa needs to preserve that. I am don't have any partition scheme on disk -- whole disk for ZFS. May be someone use some scheme before, on other server, before insert. I am don't need it. > I think it would be really useful if gpart recover could help with this > somehow. šThere is a valid mbr, and a partially-valid gpt (only the > backup is valid). šSo gpart recover should provide a way to recover the > gpt by refreshing the primary gpt and the pbmr, or recover the mbr by > wiping the backup gpt. šI'm not sure what the syntax would be to > specify that, though. > > This didn't used to be a problem until the changes that made the backup > gpt get used automatically without any sysadmin intervention. This is other case, but may be usefull too.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20161230174018.GP37118>