From owner-freebsd-current Sun Oct 6 6:51:29 2002 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 CEBC837B401 for ; Sun, 6 Oct 2002 06:51:27 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id D0CEC43E65 for ; Sun, 6 Oct 2002 06:51:26 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id g96DpLpS012984; Sun, 6 Oct 2002 15:51:21 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: walt Cc: freebsd-current@FreeBSD.ORG Subject: Re: GEOM problems? In-Reply-To: Your message of "Sun, 06 Oct 2002 06:43:09 PDT." <3DA03DED.7090901@hotmail.com> Date: Sun, 06 Oct 2002 15:51:21 +0200 Message-ID: <12983.1033912281@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <3DA03DED.7090901@hotmail.com>, walt writes: >#disklabel -r ad2s2 ># size offset fstype [fsize bsize bps/cpg] > a: 17207240 7773835 4.2BSD 0 0 0 # (Cyl. 483*- 1554*) >#disklabel ad2s2 ># size offset fstype [fsize bsize bps/cpg] > a: 17207240 400000 4.2BSD 0 0 0 # (Cyl. 24*- 1095*) >This behavior is new with GEOM, as is the warning about c not covering the >whole unit. The kernel without GEOM offers no complaints about the same label. This is because the old code would lie to you if you tried to read the disklabel directly off the media instead of using the ioctl() calls. I feel it is fundamentally wrong to modify data in-band this way without telling the user. Therefore I have not implemented it in GEOM. For reasons I have never fully accepted, the BSD disklabel is written to represent the entire physical disk so the ondisk information does not actually list partition 'c' as starting on sector zero, rather it lists the physical sector number (which corresponds to the start sector of that slice). The way GEOM deals with BSD labels, it will try to identify such a "magic" offset and correctly DTRT, but it will also accept un-offset ondisk disklabels, which I hope we can migrate to now. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message