From owner-freebsd-questions@FreeBSD.ORG Thu Jul 12 16:07:27 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 37A0E106564A for ; Thu, 12 Jul 2012 16:07:27 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id E38C58FC08 for ; Thu, 12 Jul 2012 16:07:26 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id q6CG7Q8X047562; Thu, 12 Jul 2012 10:07:26 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.5/8.14.5/Submit) with ESMTP id q6CG7Qpe047559; Thu, 12 Jul 2012 10:07:26 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Thu, 12 Jul 2012 10:07:26 -0600 (MDT) From: Warren Block To: Wojciech Puchar In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Thu, 12 Jul 2012 10:07:26 -0600 (MDT) Cc: Kaya Saman , miles kuo , freebsd-questions@freebsd.org Subject: Re: How to mirror the FreeBSD OS on two disks X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 16:07:27 -0000 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.