From owner-freebsd-fs@FreeBSD.ORG Mon Apr 2 22:49:45 2007 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5448416A402; Mon, 2 Apr 2007 22:49:45 +0000 (UTC) (envelope-from fbsd-fs@mawer.org) Received: from customer-domains.icp-qv1-irony15.iinet.net.au (customer-domains.icp-qv1-irony15.iinet.net.au [203.59.1.175]) by mx1.freebsd.org (Postfix) with ESMTP id 9188113C465; Mon, 2 Apr 2007 22:49:44 +0000 (UTC) (envelope-from fbsd-fs@mawer.org) Received: from 203-206-173-235.perm.iinet.net.au (HELO [10.24.1.1]) ([203.206.173.235]) by iinet-mail.icp-qv1-irony15.iinet.net.au with ESMTP; 03 Apr 2007 06:39:37 +0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAABwjEUbLzq3r/2dsb2JhbAAN X-IronPort-AV: i="4.14,362,1170604800"; d="scan'208"; a="113425919:sNHT7802376" Message-ID: <461185C6.3040801@mawer.org> Date: Tue, 03 Apr 2007 08:37:58 +1000 From: Antony Mawer User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <20070330181015.GB11360@garage.freebsd.pl> <20070402161220.GA34180@garage.freebsd.pl> In-Reply-To: <20070402161220.GA34180@garage.freebsd.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org Subject: Re: gjournal error X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2007 22:49:45 -0000 On 3/04/2007 2:12 AM, Pawel Jakub Dawidek wrote: > On Mon, Apr 02, 2007 at 12:35:10PM +0300, Dan Cojocar wrote: ... >> Here it is: >> bsdlabel /dev/ad1s1 >> 12:32:40 >> # /dev/ad1s1: >> 8 partitions: >> # size offset fstype [fsize bsize bps/cpg] >> c: 234440625 0 unused 0 0 # "raw" part, >> don't edit >> d: 20971520 0 4.2BSD 2048 16384 28552 >> e: 213469105 20971520 4.2BSD 2048 16384 28552 > > 'd' partition is wrong, it should start at offset 16. You get EPERM > (error=1) when someone tries to write to first 16 sectors where metadata > is stored. This point relates to a recent thread on -questions, where we were discussing the offset of 16 and whether it was still relevant. The issue arose because disklabel cannot compute the "hog partition" when using an offset of 16 -- it (incorrectly) assumes the starting offset is is 0, and as a result the last partition goes past the end of the disk. http://docs.freebsd.org/cgi/getmsg.cgi?fetch=1660728+0+archive/2007/freebsd-questions/20070401.freebsd-questions What sort of meta-data is typically stored in these first 16 sectors? Is it only of concern if you are using some of the various GEOM modules that require meta data storage? It sounds to me like disklabel needs to be modified in how it treats a "*" in the size field: on the 'c' partition, continue to use the full size of the device; if used on any others, it needs to take into account the offset of the first non-'c' partition... Does this sound right? If so, I may have a go at writing a patch at some point. --Antony