5333 private links
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.
//
You need to zero out the backup gpt header. Geom locates that header
using (mediasize / sectorsize) - 1. I think mediasize/sectorsize is
exactly what's displayed by diskinfo -v as "mediasize in sectors", so
that number - 1 would be lastsector in:
dd if=/dev/zero of=/dev/da6 bs=<sectorsize> oseek=<lastsector> count=1
//
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. //
You need to use gpart destroy -F
to CORRUPTED GPT, this command will wipe last sector where GPT backup header is located. Since GPT is in CORRUPT state, the primary header
will not be overwrited by this command.
When both primary and backup headers and tables are valid, gpart destroy
overwites PMBR, primary and backup headers.