From owner-freebsd-doc@FreeBSD.ORG Tue Aug 26 12:42:21 2008 Return-Path: Delivered-To: freebsd-doc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78B2D1065679 for ; Tue, 26 Aug 2008 12:42:21 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from pittgoth.com (pittgoth.com [205.134.163.206]) by mx1.freebsd.org (Postfix) with ESMTP id 4C4DC8FC12 for ; Tue, 26 Aug 2008 12:42:21 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from localhost.fbsdsecure.org (c-68-83-213-214.hsd1.va.comcast.net [68.83.213.214]) (authenticated bits=0) by pittgoth.com (8.14.2/8.14.2) with ESMTP id m7QCgKXE070333 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 26 Aug 2008 08:42:20 -0400 (EDT) (envelope-from trhodes@FreeBSD.org) Date: Tue, 26 Aug 2008 08:42:11 -0400 From: Tom Rhodes To: John R Levine Message-Id: <20080826084211.48ab8953.trhodes@FreeBSD.org> In-Reply-To: References: X-Mailer: Sylpheed version 1.0.6 (GTK+ 1.2.10; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-doc@FreeBSD.org Subject: Re: Update to section 19.4 on disk mirroring X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Aug 2008 12:42:21 -0000 On Mon, 25 Aug 2008 23:39:46 -0400 (EDT) John R Levine wrote: > I just added an extra disk to a BSD server to mirror the existing one, and > looked at section 19.4 on GEOM mirroring. While the advice it gives on > setting up bootable gmirror disks isn't wrong, it's seriously suboptimal > since it involves a needless full copy of a disk, which takes hours rather > than five minutes if you do it the easy way. > > I dunno what the etiquette is for updating the handbook, but I'd be happy > to redo this part to say, roughly: > > It's straightforward to convert any bootable FreeBSD disk to a gmirror > mirror if you have a second disk of the same size. Call the existing disk > ad0 and the new second disk ad2. > > First, use fdisk to set the slices on the second disk identically to the > first disk, using fdisk -p to dump the slice config of ad0 and fdisk -f to > apply that config to ad2. Put geom_mirror_load="YES" into > /boot/loader.conf to ensure that gmirror is loaded at boot time, or build > and install a new kernel with options GEOM_MIRROR. > > You can't do GEOM work when any of the file systems are mounted, so > reboot from a live FS CD. Create the mirror, initially with the single > existing disk: > > # gmirror label -v gm0 ad0 > > You should see a kernel message confirming the creation of the mirror, and > a listing /dev/mirror should show an entry corresponding to each partition > on the disk, e.g., for /dev/ad0s1a now there's /dev/mirror/gm0s1a > > You need to change fstab to refer to the mirrored file systems. Mount > your root fs on /mnt so you can edit it: > > # mount /dev/mirror/gm0s1a /mnt I like to skip this step altogether ... but you're right, the section needs re-written. I have something, it's not marked up yet. Perhaps I'll work on that this week. -- Tom Rhodes