How to mirror the FreeBSD OS on two disks
wblock at wonkity.com
Thu Jul 12 16:07:27 UTC 2012
On Thu, 12 Jul 2012, Wojciech Puchar wrote:
>>> I am no expert at this however a quick Google search comes up with:
>> The procedure shown there produces a mirror that will not boot on FreeBSD
> 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
> 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.
The current Handbook procedure avoids the copy by using the existing
disk as-is and just writing the gmirror metadata to the last block. If
that last block is already part of an MBR partition, the more strict
checking stops booting in 9.0.
More information about the freebsd-questions