Gpart

From wikinotes

gpart is a BSD tool for working with partition tables. Similar to linux's fdisk.

camcontrol devlist   # list all devices
gpart list           # print all disks (with gpt partition tables)
fstyp /dev/da0s1     # detect filesystem type
gpart show /dev/da0  # print partition table for da0

# create/destroy partition table
sudo gpart destroy -F da1 
gpart create -s gpt /dev/da0

# create partitions
gpart add -s 160G -t freebsd-ufs /dev/da0
newfs -U da0p1                               # create new ufs filesystem on da0p1