From owner-freebsd-geom@FreeBSD.ORG Sat May 20 13:05:40 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 48BD616A428 for ; Sat, 20 May 2006 13:05:40 +0000 (UTC) (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 7F1C743D53 for ; Sat, 20 May 2006 13:05:36 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 48F1152DDD; Sat, 20 May 2006 15:05:35 +0200 (CEST) Received: from localhost (public-gprs28848.centertel.pl [87.96.112.176]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 56C0D50E96; Sat, 20 May 2006 15:05:12 +0200 (CEST) Date: Sat, 20 May 2006 15:03:06 +0200 From: Pawel Jakub Dawidek To: "Rick C. Petty" Message-ID: <20060520130306.GA7030@garage.freebsd.pl> References: <200605161555.08195.darcy@wavefire.com> <20060517171955.GB838@garage.freebsd.pl> <20060519172148.GA54819@teardrop.org> <20060519180604.GA37562@megan.kiwi-computer.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zYM0uCDKw75PZbzx" Content-Disposition: inline In-Reply-To: <20060519180604.GA37562@megan.kiwi-computer.com> 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=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: James Snow , freebsd-geom@freebsd.org Subject: Re: Slices + stripes and mirrors 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: Sat, 20 May 2006 13:05:41 -0000 --zYM0uCDKw75PZbzx Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 19, 2006 at 01:06:04PM -0500, Rick C. Petty wrote: +> On Fri, May 19, 2006 at 01:21:49PM -0400, James Snow wrote: +> > On Wed, May 17, 2006 at 07:19:55PM +0200, Pawel Jakub Dawidek wrote: +> > > On Tue, May 16, 2006 at 03:55:07PM -0700, Darcy Buskermolen wrote: +> > > +>=20 +> > > +> I have a 6.1 setup with 4 identical 300GB disks, ad4,6,8,10. I'd= like to=20 +> > > +> create a bootable mirror (gm0s1) of all 4 disks on a 512MB slice,= and have=20 +> > > +> the remaining space a big slice (gs0s2).=20 +> >=20 +> > I'm going something almost identical and have been having some +> > difficulty. =20 +>=20 +> Who don't people use gvinum more? These more complex setups require more +> flexibility. Also gvinum will let you grab the full disks and not deal +> with mirroring the slices individually. Using gmirror on slices seems +> pretty hackish to me. Maybe for you. This what GEOM infrastucture gives you - you don't care if this is a disk, slice, partition, mirror device, encrypted device, etc. It is provider and you can do whatever you need to do with it. This is the flexibility. Imagine a configuration where you have 5 disks. Create one 2GB slice on all disks, and use the rest space for the second slice. Now, create root file system by mirroring da0s1a and da1s1a. Create /usr/ on raid3(da2s1, da3s1, da4s1) and create /home/ on raid3(da0s2, da1s2, da2s2, da3s2, da4s2). This is the flexibility. +> > > Ok, first initialize your disks and create two slices on them: +> > >=20 +> > > # apply "fdisk -Bi /dev/ad%1" 4 6 8 10 +> > >=20 +> > > (If they are identical, you can probably initizlize one of them and = copy +> > > first 63 sectors to the others.) +> > >=20 +> > > Once you have your slices, create a mirror: +> >=20 +> > I've been using Ralf's guide[1] for the basics of this, and he mentions +> > that you need to shrink the slice by one sector. Is this still the ca= se +> > in 6.1? If so, when doing two slices per disk, do you need to shrink +> > both slices by one sector, or only the last slice on the disk? +>=20 +> The reason you nede to shrink the slice is because the metadata for gmir= ror +> is stored on the last sector of the provider (which in this case is a +> slice, but usually is just the disk). Because the metadata is stored for +> each instance in the mirror, every slice you mirror will shrink by one +> sector. Because you are mirroring slices not disks, gmirror doesn't "kn= ow" +> about the disks. Again, this method seems very hackish. If you mirror = the +> entire disk, gmirror will provide a device that is one sector smaller th= an +> the disk.. this should be transparent. If you're not mirroring the ent= ire +> disk, I think you're halfway down a dangerous path. Hehe, cool. So check by yourself how gvinum is transparent:) It doesn't use metadata?:) I'm sure it takes much more than one sector. And again. You simply don't understand what for GEOM was actually introduced... +> In any case, I've had better luck using gvinum even for just plain +> mirroring. Also, I feel that his guide implies setting up mirroring is +> less than trivial. IMO, it's easier to use a livecd since you have to +> reboot the box anyway. For that number of steps, why not use gvinum +> instead? You'd have more flexibility and you can do things like resize +> volumes and add/remove drives while the system is up. You can't add/remove gmirror's component which the system is up? Resizing should be done with another GEOM class. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --zYM0uCDKw75PZbzx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFEbxOKForvXbEpPzQRAowDAJ9me2Su4Xc46z8TZdB8IZfYjotsgQCaAgX7 +z2IsSnFTkD5aeBTdf0AH+c= =zEzj -----END PGP SIGNATURE----- --zYM0uCDKw75PZbzx--