Date: Thu, 12 Jul 2012 10:07:26 -0600 (MDT) From: Warren Block <wblock@wonkity.com> To: Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl> Cc: Kaya Saman <kayasaman@gmail.com>, miles kuo <miles.kuo@gmail.com>, freebsd-questions@freebsd.org Subject: Re: How to mirror the FreeBSD OS on two disks Message-ID: <alpine.BSF.2.00.1207121004560.47013@wonkity.com> In-Reply-To: <alpine.BSF.2.00.1207121649080.2235@wojtek.tensor.gdynia.pl> References: <CAGpP9XOvVor7HmxDP7SFhc7AFnpSf-s%2BgXbkJsguiAo=xNvnVA@mail.gmail.com> <CAPj0R5L1=HaY1Bf-51FB59J6Q4pX1s4yDbzXoAAWRwei6yqt-A@mail.gmail.com> <alpine.BSF.2.00.1207110702490.76348@wonkity.com> <alpine.BSF.2.00.1207121649080.2235@wojtek.tensor.gdynia.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 12 Jul 2012, Wojciech Puchar wrote: >>> >>> 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. 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1207121004560.47013>