this is obsolete doc -- see http://doc.nethence.com/ instead

FreeBSD GEOM mirror configuration 

 

 

Initiate the mirror (start with one disk), 

sysctl kern.geom.debugflags=17
gmirror label -vb round-robin gm0 /dev/ad4
gmirror load

Note. change 'ad4' accordingly 

 

Eventually enable the mirror at boot, 

echo 'geom_mirror_load="YES"' >> /boot/loader.conf

 

Fix the mount points, 

vi /etc/fstab
:%s/ad4/mirror\/gm0/g

 

Reboot on gm0s1a, 

shutdown -r now

 

Check everything's fine, 

cat /etc/fstab
mount

 

Insert the second disk to make the mirror, 

gmirror insert gm0 /dev/ad6

and check how it is going regulary, 

gmirror status

 

That's all. If a disk fails some day, unconfigure it, 

gmirror forget ad6

and put a new one, 

gmirror insert gm0 /dev/ad7

 

Refs. 

http://www.freebsd.org/doc/en/books/handbook/geom-mirror.html