Date: Sun, 06 Oct 2002 15:51:21 +0200 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: walt <wa1ter@hotmail.com> Cc: freebsd-current@FreeBSD.ORG Subject: Re: GEOM problems? Message-ID: <12983.1033912281@critter.freebsd.dk> In-Reply-To: Your message of "Sun, 06 Oct 2002 06:43:09 PDT." <3DA03DED.7090901@hotmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?12983.1033912281>