From owner-freebsd-current@FreeBSD.ORG Mon Sep 20 17:39:03 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1409216A4CF for ; Mon, 20 Sep 2004 17:39:03 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7B2F43D2F for ; Mon, 20 Sep 2004 17:39:02 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id i8KHf6fq024595; Mon, 20 Sep 2004 10:41:06 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id i8KHf67P024594; Mon, 20 Sep 2004 10:41:06 -0700 Date: Mon, 20 Sep 2004 10:41:06 -0700 From: Brooks Davis To: cbh-freebsd-current@groups.chrishedley.com Message-ID: <20040920174106.GB21687@odin.ac.hmc.edu> References: <20040919225036.B1582@teapot.cbhnet> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OwLcNYc0lM97+oe1" Content-Disposition: inline In-Reply-To: <20040919225036.B1582@teapot.cbhnet> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: freebsd-current@freebsd.org Subject: Re: Possible bug in sbin/bsdlabel.c in -CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2004 17:39:03 -0000 --OwLcNYc0lM97+oe1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 19, 2004 at 11:01:25PM +0100, cbh-freebsd-current@groups.chrish= edley.com wrote: > Evening, chaps. >=20 > I don't think anyone's brought this one up yet, and it's a little=20 > obscure... but for those of us who have MAXPARTITIONS set to a nonstandar= d=20 > value (16 in my case, I need some extra as I'm using a largeish RAID arra= y=20 > that I'd like to chop into managable pieces), it seems that bsdlabel=20 > randomly hiccups with a warning about the label length being wrong=20 > ("disklabel: Wrong length label argument" after attempting to edit the=20 > label, even without making any changes). This only happens on certain=20 > discs for reasons beyond my ken, but it seems that the culprit is circa= =20 > line 410 in sbin/bsdlabel/bsdlabel.c which currently says >=20 > gctl_ro_param(grq, "label", 148+16*8); >=20 > but which I'm guessing should say >=20 > gctl_ro_param(grq, "label", 148+16*MAXPARTITIONS); >=20 > The modification seems to work on my -CURRENT box without causing any=20 > obvious harm, so I thought I'd mention it here to see what people think. >=20 > Cheers, >=20 > Chris. >=20 > PS Just to clarify, the discs which the unmodified disklabel worked on ar= e=20 > <40GB SCSI units attached to AIC 789x channels, and the one which it=20 > didn't work on is a 450GB RAID-10 aac (2410SA) array. IIRC you can't extend the number of partitions unless you don't need boot blocks so this isn't all that useful except in situtations where gpt(8) is a much better solution. Fixing this hardcoding seems like a reasionable idea, but I'm not an expert on this subject. We're trying to avoid stopgap hack to bsdlabel in general because it's an obviously dead-end solution and we want to move on to something like GPT as soon as feasiable. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --OwLcNYc0lM97+oe1 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBTxYxXY6L6fI4GtQRApvMAJ95YDao3rAcYlVkxYMCoTvanT4lWQCdF3HP 9JuQ63yY3Agypq2fXt1ZAlQ= =ChCy -----END PGP SIGNATURE----- --OwLcNYc0lM97+oe1--