From owner-freebsd-questions@FreeBSD.ORG Tue Oct 13 12:40:52 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E0521065670 for ; Tue, 13 Oct 2009 12:40:52 +0000 (UTC) (envelope-from nb@ravenbrook.com) Received: from raven.ravenbrook.com (raven.ravenbrook.com [193.164.110.8]) by mx1.freebsd.org (Postfix) with ESMTP id EA49F8FC13 for ; Tue, 13 Oct 2009 12:40:51 +0000 (UTC) Received: from thrush.ravenbrook.com (thrush.ravenbrook.com [193.164.110.145]) by raven.ravenbrook.com (8.14.3/8.14.2) with ESMTP id n9DCMjd5060724 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Tue, 13 Oct 2009 13:22:45 +0100 (BST) (envelope-from nb@ravenbrook.com) Received: from thrush.ravenbrook.com (localhost [127.0.0.1]) by thrush.ravenbrook.com (8.13.4/8.13.4) with ESMTP id n9DCMjXN059890; Tue, 13 Oct 2009 13:22:45 +0100 (BST) (envelope-from nb@thrush.ravenbrook.com) From: Nick Barnes To: freebsd-questions@freebsd.org Date: Tue, 13 Oct 2009 13:22:45 +0100 Message-ID: <59889.1255436565@thrush.ravenbrook.com> Sender: nb@ravenbrook.com X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (raven.ravenbrook.com [193.164.110.8]); Tue, 13 Oct 2009 13:22:45 +0100 (BST) X-Virus-Scanned: ClamAV 0.94.1/9883/Tue Oct 13 11:43:35 2009 on raven.ravenbrook.com X-Virus-Status: Clean X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on raven.ravenbrook.com X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 Cc: Ravenbrook SysAdmins Subject: how does gmirror start up? 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: Tue, 13 Oct 2009 12:40:52 -0000 I am running a 6.3 system and have had various problems with disk reliability on a key filesystem, probably down to SCSI hardware or drivers. I'm intending to replace that SCSI disk with a pair of SATA disks ad6/7, using gmirror as gm0 (while keeping ad4 as our boot disk). I have set up the mirror and right now I'm part-way through using rsync to transfer the data. But I have a question concerning the underlying operation of GEOM, which is troubling me. I have read the various man pages and handbook pages relating to GEOM and gmirror, but they don't seem to answer this. When I reboot the system, gmirror comes up (because of the line in /boot/loader.conf) and gm0 appears, backed by ad6/7. Where is this configuration information stored? That is, how does the system know to make gm0, with ad6/7 as the backing store. I would expect there to be a file somewhere in /etc with this config information, but I don't see it in the documentation. From reading gmirror(8), I understand that there is a label sector at the ends of ad6 and ad7, identifying them as parts of gm0. But that config information is back-to-front: at boot time the system knows from /etc/fstab that it needs gm0; how does it find the underlying disks? Does the system search the ends of all physically-attached disks, looking for GEOM labels, and automatically make any corresponding GEOM devices? Surely not (that would mean, for instance, that if I took one of these disks out of this machine and put it into another FreeBSD system then that machine would automatically set up gm0 with this disk). Possibly I'm just being dense. Can someone enlighten me? Nick Barnes Ravenbrook Limited