FreeBSD user DutchDaemon shows us how to set up RAID10 on FreeBSD 10.1.

Just a quick and unceremonious write-up of an installation I performed just now. Substitute device names at your own leisure. These are four 4 TB disks (ada0ada3) in a QNAP. Note that these disks only constitute a dedicated RAID10 storage pool. The OS runs from a separate disk (USB in this case) and mounts the storage pool.

Code:
# load your kernel modules
kldload geom_label
kldload geom_mirror
kldload geom_stripe

# if necessary
dd if=/dev/zero of=/dev/ada0 count=2
dd if=/dev/zero of=/dev/ada1 count=2
dd if=/dev/zero of=/dev/ada2 count=2
dd if=/dev/zero of=/dev/ada3 count=2

gpart create -s gpt ada0
gpart create -s gpt ada1
gpart create -s gpt ada2
gpart create -s gpt ada3

# RAID1 mirror ada0+ada1
gpart add -t freebsd-ufs -l ada0data ada0
gpart add -t freebsd-ufs -l ada1data ada1

gmirror label datastore01 /dev/gpt/ada0data /dev/gpt/ada1data

newfs -U /dev/mirror/datastore01

## ONLY FOR MIRROR TEST
## echo '/dev/mirror/datastore01 /data1 ufs rw,noatime 1 1' >> /etc/fstab
## mkdir /data1
## mount /data1
## REMOVE ABOVE AFTER TEST

# RAID1 mirror ada2+ada3
gpart add -t freebsd-ufs -l ada2data ada2
gpart add -t freebsd-ufs -l ada3data ada3

gmirror label datastore02 /dev/gpt/ada2data /dev/gpt/ada3data

newfs -U /dev/mirror/datastore02

## ONLY FOR MIRROR TEST
## echo '/dev/mirror/datastore02 /data2 ufs rw,noatime 1 1' >> /etc/fstab
## mkdir /data2
## mount /data2
## REMOVE ABOVE AFTER TEST

# RAID0 from both RAID1 mirrors

gstripe label -v datastore /dev/mirror/datastore01 /dev/mirror/datastore02

newfs -U /dev/stripe/datastore

echo '/dev/stripe/datastore /data ufs rw,noatime 2 2' >> /etc/fstab

Et voilà:

Code:
mkdir /data
mount -a
df -h | grep datastore

/dev/stripe/datastore  7.0T  8.0K  6.5T  0%  /data

In /boot/loader.conf:

Code:
geom_label_load="YES"
geom_mirror_load="YES"
geom_stripe_load="YES"

Original post: https://forums.freebsd.org/threads/setup-of-raid10-raid0-stripe-of-two-raid1-mirrors-on-freebsd-10-1.51277/