# vi /boot/loader.conf

geom_mirror_load="YES"

Restart server.

# reboot

Create raid with one disk.

# gmirror label -v -b round-robin gm0 /dev/ada1

Create backup table partition.

# gpart backup ada0 > /tmp/ada0.txt

Restore table partition on gm0.

# gpart restore mirror/gm0 < /tmp/ada0.txt

Write bootloader.

# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 mirror/gm0

Show raid status.

# gmirror status
# gmirror list

Format partition on gm0.

# newfs -U /dev/mirror/gm0p2

Mount it to mnt.

# mount /dev/mirror/gm0p2 /mnt

Edit fstab.

# vi /etc/fstab

Before:

/dev/ada0p2     /     ufs     rw     1     1
/dev/ada0p3     none  swap    sw     0     0

After:

/dev/mirror/gm0p2     /     ufs     rw     1     1
/dev/mirror/gm0p3     none  swap    sw     0     0

Backup system.

#  tar -czvf system.tar.gz --one-file-system /

Restore backup to gm0p2.

# tar -zxvf system.tar.gz -C /mnt/

Reboot server.

# reboot

Insert second disk to our Raid.

# gmirror insert gm0 ada0

Check.

# gmirror status