copying partition tables in freebsd
just a quick snippet because i know this is one of those things i will need later but will forget how to do and start searching for again. if you have to replace a drive in zfs it’s probably best (when you get the replacement drive) to make sure their partition tables match to keep things consistent.
# /sbin/gpart backup <source> | /sbin/gpart restore -F <target>
as an example.
# /sbin/gpart backup ada0 | /sbin/gpart restore -F ada1
this is just the partition table. labels (and swap if you have that) need to still be done. another things is if you are doing this to a boot drive then you need to write boot code to the boot partition.