Tried to manually setup my disks in order to install root FreeBSD on a ZFS mirror, but following the how-toâ€™s available, I couldnâ€™t get pass the first command.
gpart create -s gpt ad0
geom 'ad0': File exists
I tried deleting the partitions/slices, even doing a â€œdd of=/dev/nullâ€ on my drives. But I keep getting this file exists error, which is totally less-than-helpful. Google didnâ€™t give me much help either, but it did lead me to other info which helped.
Soâ€¦ delete the partitions:
gpart delete -i 2 ad0 gpart delete -i 1 ad0
In the above, I only had 2 partitions, so you may need to add a line for â€œ-i 3â€ if you had a third, fourth, etc. Also, in my case I was setting up a mirror on ZFS, so I repeated all these for both drives. (ad0 and ad2, for my system)
After that, there was a ONE EXTRA thing that was needed before the â€œgpart createâ€ command would work. You need to â€œdestroyâ€ it!
gpart destroy ad0
I was finally able to runt he gpart create normally after that. If you had drives setup previously from another system, this was how I removed any partition info on them.
These are the sites I used as reference.