While moving some drives around on my system I ran into some rather critical issues. Here’s how I solved them.
I had six multipath drives configured with gmultipath, with the gmultipath information at the end of the block. Normally this is ok, gmultipath handles importing them. And the system dosent really mind that gmultipath overwrites the last LBA and therefore makes the secondary gpt header nonfunctional.
However when I moved them to a new system that did not have multipath controllers i ran into an issue where FreeBSD thought that the GPT was corrupted. Luckily after some finagling I found the issue.
Since gmultipath had still written over the last LBA I started by clearing it. Firs you must stop gmultipath on that drive.
gmultipath stop diskNN
then you can make the drive no longer a multipath drive
gmultipath clear daNN
this will erase the last LBA basically! so make sure to recover it next.
gpart recover daNN
And thats about it, now the gpt should have a primary, and secondary. and you should be good to go!