From owner-freebsd-geom@FreeBSD.ORG Fri Sep 24 17:18:17 2004 Return-Path: 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 0BA7D16A4CE for ; Fri, 24 Sep 2004 17:18:17 +0000 (GMT) Received: from clueful.shagged.org (clueful.shagged.org [212.13.201.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF21E43D45 for ; Fri, 24 Sep 2004 17:18:16 +0000 (GMT) (envelope-from chris@clueful.shagged.org) Received: from chris by clueful.shagged.org with local (Exim 4.40 (FreeBSD)) id 1CAthy-000LBX-B6; Fri, 24 Sep 2004 18:18:10 +0100 Date: Fri, 24 Sep 2004 18:18:10 +0100 From: Chris Elsworth To: Paul Mather Message-ID: <20040924171810.GA80912@shagged.org> References: <20040924160620.GA77997@shagged.org> <1096044939.9306.54.camel@zappa.Chelsea-Ct.Org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1096044939.9306.54.camel@zappa.Chelsea-Ct.Org> User-Agent: Mutt/1.5.6i Sender: Chris Elsworth X-Shagged-MailScanner-Information: See www.mailscanner.info for information X-Shagged-MailScanner: Found to be clean X-MailScanner-From: chris@clueful.shagged.org cc: freebsd-geom@freebsd.org Subject: Re: WARNING: Expected rawoffset 0, found 63 ? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2004 17:18:17 -0000 On Fri, Sep 24, 2004 at 12:55:40PM -0400, Paul Mather wrote: > On Fri, 2004-09-24 at 12:06, Chris Elsworth wrote: > > > I feel I'm missing something blatantly obvious here. Is that offset of > > 63 something to do with metadata? Have I not left any space for > > metadata that I should have done? I was hoping that I'd be able to end > > up applying this gmirror command to an existing disk with live data on > > it, and then attach a free disk to achieve a complete mirror from an > > existing system? > > Intuitively, I'd say it was more logical to create the mirror first on > the slice and *then* label/partition and newfs that. In other words, > attach the free disk and create the mirror on that (copying across data > from the existing system). Then, when you have the mirror running, add > the old drive to it for a two-disk mirror. Well, I think that's basically what I'm doing? I'm practising on the free disk first (good job, really). Starting with a completely fresh disk with no partition table or anything (dd if=/dev/zero of=/dev/da1 count=100 should ensure that?) I'm using sysinstall to create a slice; the Fdisk option in sysinstall, and all I'm doing there is using the entire disk and making it bootable. I save that out, then quit sysinstall and what I'm left with is: app1# disklabel -r da1s1 # /dev/da1s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] c: 71119692 0 unused 0 0 # "raw" part, don't edit Is that what you'd start off with? So then by mirroring the slice, I'd do: gmirror label -hv gms1 da1s1 And then I can start partitioning in /dev/mirror/gms1a etc, after using disklabel to create it. But the gmirror command is where the problems start; see pastes of disklabel on the gms1 device in first post. > In my case, I was doing a fresh install onto a two-disk system. I did a > regular minimal install onto disk 1. Then, I created slices on disk 2 > (I wanted one slice for a geom_mirror, another slice for a > geom_stripe). Next, I used glabel to label the slice on disk 2 I'd be > using for my mirror. (I want to be able to have the disks move ATA ids > and not worry about breaking the mirror.) I then created a geom_mirror > using gmirror using the labelled provider as the sole provider (and > using "-h" to hard-code the providers into the metadata). Now I had my > mirror. > > Then, it was a matter of bsdlabelling the mirror. At this point, or indeed, even now, if you disklabel -r on your mirror device, does it not give you warnings about partition c? If not, that's where we start to differ :) > Kudos to Pawel for such a useful GEOM class! Definitely, I've always been a fan of Solstice Disk-Suite on Solaris and this looks like being a very good FreeBSD competitor :) -- Chris