From owner-freebsd-geom@FreeBSD.ORG Tue Jan 17 12:10:01 2006 Return-Path: X-Original-To: freebsd-geom@freebsd.org Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB2BA16A41F for ; Tue, 17 Jan 2006 12:10:01 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F13A43D5A for ; Tue, 17 Jan 2006 12:09:48 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 7447050A7F; Tue, 17 Jan 2006 13:09:40 +0100 (CET) Received: from localhost (pjd.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id E3E8750A16; Tue, 17 Jan 2006 13:09:23 +0100 (CET) Date: Tue, 17 Jan 2006 13:09:08 +0100 From: Pawel Jakub Dawidek To: Brent Hostetler Message-ID: <20060117120908.GB20602@garage.freebsd.pl> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7iMSBzlTiPOCCT2k" Content-Disposition: inline In-Reply-To: X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r535 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-geom@freebsd.org Subject: Re: Metadata info. X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jan 2006 12:10:01 -0000 --7iMSBzlTiPOCCT2k Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 14, 2006 at 01:19:02PM -0800, Brent Hostetler wrote: +> Hello, +>=20 +> I am trying to understand how metadata works properly within the +> geom framework. I have been having varying problems which I +> believe are metadata related. +>=20 +> I assume from the following quote from gmirro man page +> that metadata is stored on the last sector of the provider -- +> ie /dev/ad4, /dev/ad4s1, /dev/stripe1, or /dev/stripe1a -- and not +> necessarily the last sector of the disk. +>=20 +> The gmirror utility uses on-disk metadata (stored in +> the provider's last sector) to store all needed information. +> Since the last sector is used for this purpose,it is possible +> to place a root file system on a mirror. +>=20 +> Because of this I notice that when setting up a mirror of a +> slice you will get error from bsdlabel /dev/ad4 saying +> bsdlabel: partition c doesn't cover the whole unit!... If you +> bsdlabel the actual /dev/mirror/data1 it will not issue the +> warning. The is correct behavior right? +>=20 +> So if you are mirroring /dev/ad4 then you would make sure that +> the last slice that is created is one sector smaller then the media +> size in sectors such as example 1. +>=20 +> Example 1: +>=20 +> gmirror label -v -n -b round-robin data1 /dev/ad4 +>=20 +> [------ ad4 ------] +> [-----ad4s1------]* +> [ad4s1a][-ad4s1d-]* +>=20 +> or +>=20 +> [----------ad4------------] +> [-----ad4s1----][--ad4s2-]* +> [ad4s1a][ad4s1b][-ad4s2a-]* That's correct. +> If you are operating on slices then you would make sure the last +> partition in the mirrored slice would be one sector smaller then +> the slice size in sectors such as example 2 and 3. +>=20 +> Example 2: +>=20 +> gmirror label -v -n -b round-robin data1 /dev/ad4s1 +>=20 +> [----------- ad4 --------------] +> [----ad4s1-----]*[---ad4s2-----] +> [ad4s1d][ad4s1e]*[---ad4s2a----] +>=20 +>=20 +> Example 3: +>=20 +> gmirror label -v -n -b round-robin data1 /dev/ad4s1 +> gmirror label -v -n -b round-robin data2 /dev/ad4s2 +>=20 +> [----------- ad4 --------------] +> [----ad4s1-----]*[---ad4s2----]* +> [ad4s1d][ad4s1e]*[---ad4s2a---]* No, example 2: [----------- ad4 --------------] [----ad4s1------][---ad4s2-----] [ad4s1d][ad4s1e]*[---ad4s2a----] Example 3: [----------- ad4 --------------] [----ad4s1------][---ad4s2-----] [ad4s1d][ad4s1e]*[---ad4s2a---]* +> If operating on geom's class providers it works the same way +> correct? +>=20 +> Example 4: +>=20 +> gmirror label -v -n -b round-robin data1 /dev/stripe/stripe1 +>=20 +> [------------stripe1-----------] +> [------stripe1s1--------------]* +> [------stripe1s1a-------------]* That's correct. But the more correct pictures are: Disk mirroring: [------------ ad4 ------------] [-------- mirror/foo --------]* [------- mirror/foos1 -------]* [mirror/foos1s][mirror/foos1d]* Slice mirroring: [------------ ad4 ------------] [---- ad4s1 ----][--- ad4s2 --] [- mirror/foo -]*[-- ad4s2a --] [ mirror/fooa -]* Partition mirroring: [------------ ad4 ------------] [---- ad4s1 ----][--- ad4s2 --] [---- ad4s1a ---][-- ad4s2a --] [- mirror/foo -]* Stripe mirroring: [--- stripe/foo ---] [--- mirror/bar --]* [-- mirror/bars1 -]* [- mirror/bars1a -]* Remember that you can setup slices/partitions on mirror device, you don't have to do it on plain disk. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --7iMSBzlTiPOCCT2k Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDzN5kForvXbEpPzQRAgveAJ9jtDs7T59T6fYF89rJHMwuGxDb/ACdFcF/ 1YJcoKQDTc/lEpQ63mvGlbg= =/fFe -----END PGP SIGNATURE----- --7iMSBzlTiPOCCT2k--