How to safely remove rest of GTP?

Andrey V. Elsukov ae at FreeBSD.org
Fri Dec 30 17:09:33 UTC 2016


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


More information about the freebsd-hackers mailing list