From owner-freebsd-geom@FreeBSD.ORG Fri Jun 29 19:34:58 2007 Return-Path: X-Original-To: freebsd-geom@freebsd.org Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 856AC16A421 for ; Fri, 29 Jun 2007 19:34:58 +0000 (UTC) (envelope-from harry@yewbarrow.net) Received: from vm.yewbarrow.net (vm.yewbarrow.net [80.68.91.52]) by mx1.freebsd.org (Postfix) with ESMTP id 25F2813C465 for ; Fri, 29 Jun 2007 19:34:58 +0000 (UTC) (envelope-from harry@yewbarrow.net) Received: by vm.yewbarrow.net (Postfix, from userid 1000) id A000D14A3F3; Fri, 29 Jun 2007 19:34:56 +0000 (GMT) To: Arne =?iso-8859-1?q?W=F6rner?= References: <186446.9762.qm@web30309.mail.mud.yahoo.com> Organization: GAUDEAMUS X-Op.135: Muss es sein ? Es muss sein X-Attribution: HN From: Harry Newton Date: Fri, 29 Jun 2007 19:34:56 +0000 In-Reply-To: <186446.9762.qm@web30309.mail.mud.yahoo.com> (arne_woerner@yahoo.com's message of "Fri, 29 Jun 2007 07:46:33 -0700 (PDT)") Message-ID: <87fy4a1rmn.fsf@vm.yewbarrow.net> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-geom@freebsd.org Subject: Re: gmirror on a slice uncertainty 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: Fri, 29 Jun 2007 19:34:58 -0000 Arne - many thanks for your help. I've a couple more questions if you don't mind ... [...] >> - this error message about partition c: >> hydra# bsdlabel ad6s2 >> # /dev/ad6s2: >> c: 583207694 0 unused 0 0 # "raw" part, >> bsdlabel: partition c doesn't cover the whole unit! >> > see: ...694 (one sector less) > This is because gmirror uses the last sector of the slice, so that the gmirror > device (mirror/home) is one sector shorter than the slice... [...] I understand this now: gmirror reserves one sector for its metadata (the last sector). I disklabel /dev/mirror/home which is one sector smaller than the underlying disks. When I look at /dev/mirror/home with bsdlabel there is no problem because the disklabel is consistent with the size of the device (/dev/mirror/home). However, when I report on the underlying disks with bsdlabel (which I can do because they start at the same place) it notes the size discrepancy and issues the warning. I don't have to worry about that at all because I should be only accessing through /dev/mirror/home. >> - and this line in /var/log/messages: >> WARNING: Expected rawoffset 0, found 41929650 >> > 41929650 == 41929587+63 > This is the beginning of slice 2 (see fdisk)... > I would guess, that slice 2 ends on the last sector of the disk, so that > gmirror is disturbed (it doesnt know if ad4 or ad4s2 (which share both the same > last sector) is its underlying disk)... I haven't followed this. If I look at the disk with sysinstall: Disk name: ad4 FDISK Partition Editor DISK Geometry: 38913 cyls/255 heads/63 sectors = 625137345 sectors (305242MB) Offset Size(ST) End Name PType Desc Subtype Flags 0 63 62 - 12 unused 0 63 41929587 41929649 ad4s1 8 freebsd 165 41929650 583207695 625137344 ad4s2 8 freebsd 165 625137345 5103 625142447 - 12 unused 0 I see there's space at the end of the disk. The code that produces the message is in geom_bsd.c and is: if (rawoffset != 0 && (off_t)rawoffset != ms->mbroffset) printf("WARNING: Expected rawoffset %jd, found %jd\n", (intmax_t)ms->mbroffset/dl.d_secsize, (intmax_t)rawoffset/dl.d_secsize); But I'm now confused as to what the importance of this message is ? > You could solve that > 1. by using hard coded disk names in gmirror Is this to prevent ad4 and ad4s2 being confused ? Doesn't gmirror know what the components that make up the provider are ? [...] > All errors/warnings r not so important possibly... > I think ur gmirror device would work fine (but dont trust me without > tests)... I think you're probably right, but I'd like to do it right and understand it more. [...] Thanks - Harry