From owner-freebsd-fs@FreeBSD.ORG Mon Apr 2 23:19:29 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 4DADE16A401 for ; Mon, 2 Apr 2007 23:19:29 +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 DCCE613C45A for ; Mon, 2 Apr 2007 23:19:28 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 3D414487FC; Tue, 3 Apr 2007 01:19:27 +0200 (CEST) Received: from localhost (154.81.datacomsa.pl [195.34.81.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id A465245684; Tue, 3 Apr 2007 01:19:21 +0200 (CEST) Date: Tue, 3 Apr 2007 01:19:18 +0200 From: Pawel Jakub Dawidek To: Antony Mawer Message-ID: <20070402231918.GI34180@garage.freebsd.pl> References: <20070330181015.GB11360@garage.freebsd.pl> <20070402161220.GA34180@garage.freebsd.pl> <461185C6.3040801@mawer.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OfrWf2Fun5Ae4m0Y" Content-Disposition: inline In-Reply-To: <461185C6.3040801@mawer.org> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (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: 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 23:19:29 -0000 --OfrWf2Fun5Ae4m0Y Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 03, 2007 at 08:37:58AM +1000, Antony Mawer wrote: > 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=3D1) when someone tries to write to first 16 sectors where metada= ta > >is stored. >=20 > This point relates to a recent thread on -questions, where we were discus= sing the offset of 16 and whether it was still relevant. The issue arose be= cause disklabel cannot=20 > 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 g= oes past the end of the=20 > disk. >=20 > http://docs.freebsd.org/cgi/getmsg.cgi?fetch=3D1660728+0+archive/2007/fre= ebsd-questions/20070401.freebsd-questions >=20 > What sort of meta-data is typically stored in these first 16 sectors? [..= =2E] Partition table stored by bsdlabel(8). > 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=20 > any others, it needs to take into account the offset of the first non-'c'= partition... >=20 > Does this sound right? If so, I may have a go at writing a patch at some = point. 'bsdlabel -w' works correctly. The biggest issue is that sysinstall(8) creates bogus partitions that start at offset 0. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --OfrWf2Fun5Ae4m0Y Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGEY91ForvXbEpPzQRAk0RAKDaS3/zgbx8w4TdqjiG4OAPp/BLvwCgwUkN NtbMNu/BuQxOQuGIPtdbNfc= =a+gz -----END PGP SIGNATURE----- --OfrWf2Fun5Ae4m0Y--