How to safely remove rest of GTP?

Alan Somers asomers at freebsd.org
Fri Dec 30 16:00:30 UTC 2016


On Fri, Dec 30, 2016 at 5:44 AM, Slawa Olhovchenkov <slw at zxy.spb.ru> 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.

It sounds like you created a GPT partition table, then created a ZFS
Pool on the raw device, leaving part of the GPT partition table
hanging around.  If you're very careful, you can use dd to erase the
GPT partition table.  The following command worked for me.  YMMV.

dd if=/dev/zero of=/dev/vtbd1 bs=8192 count=2

-Alan


More information about the freebsd-hackers mailing list