How to mirror the FreeBSD OS on two disks

Wojciech Puchar wojtek at wojtek.tensor.gdynia.pl
Thu Jul 12 14:53:11 UTC 2012


>> 
>> I am no expert at this however a quick Google search comes up with:
>> 
>> http://www.freebsd.org/doc/handbook/geom-mirror.html
>
> The procedure shown there produces a mirror that will not boot on FreeBSD 9.

no idea but my procedure certainly would work if you use installer

1) install to first disk
2) gmirror label system /dev/seconddisk
3) bsdlabel -w /dev/mirror/system
4) bsdlabel -e /dev/mirror/system - make partitions as required.
5) bsdlabel -B /dev/mirror/system
6) newfs all created partitions (/dev/mirror/systema etc...)
7) add

vfs.root.mountfrom="ufs:mirror/systema"

to loader.conf

edit /etc/fstab and change all things to new places
8) mount and copy files using tar or dump/restore to new place
9) reboot. system will start from gmirror
10) gmirror insert system /dev/firstdisk

all done.

if installer is not used but bootable media with complete system, just 
create gmirror then as usual.


More information about the freebsd-questions mailing list