Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Oct 2002 16:35:12 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        John De Boskey <jwd@FreeBSD.ORG>
Cc:        Current List <freebsd-current@FreeBSD.ORG>
Subject:   Re: 5.0 disklabel warnings against 4.7 disk
Message-ID:  <20021026162002.O6872-100000@gamplex.bde.org>
In-Reply-To: <20021026044358.GA96714@BSDWins.Com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 26 Oct 2002, John De Boskey wrote:

>    I've (re)scanned my -current folder for issues related
> to the following but didn't see a good match. Pointing
> out my blindness is allowed if this was discussed...

It's just another intentional incompatibility in GEOM.

>    I have a system onto which I installed a 4.7-RC a couple
> of weeks ago. I then upgraded that newly installed system
> to -current.
>
>    After the upgrade, disklabel now complains about
> every disk in the system, for example:
>
> # disklabel -r ad6s1
> # /dev/ad6s1c:
> ...
> 8 partitions:
> #        size   offset    fstype   [fsize bsize bps/cpg]
>   a: 195371505       63    4.2BSD     2048 16384 28512  # (Cyl.    0*- 193820*)
>   c: 195371505       63    unused        0     0        # (Cyl.    0*- 193820*)
> partition a: partition extends past end of unit
> partition c: partition extends past end of unit
> Warning, partition c doesn't start at 0!
> Warning, An incorrect partition c may cause problems for standard system utilities
> #
>
> This is an fdisk'd drive, with the entire disk allocated to the
> 1st slice.

Actually, only everything except the first 63 sectors is allocated to
the first slice.  This is shown by the offset of 63 for the partitions.
In 4.7 and other non-broken systems (e.g., -current without GEOM),
slice offsets are absolute (63 here) on the disk but the ioctl used
by disklabel(8) subtracts the offset of the 'c' partition for the slice
being looked at so that the offsets seen by disklabel(8) are slice-relative.
The corresponding ioctl implemented by GEOM doesn't subtract the offset
and disklabel(8) complains.  disklabel(8)'s error checking may have
been weakened a bit so that this is a warning and not an error.  You
would have to be careful writing back a label either way.

> An identical disk (ad4):
>
> ad4: 95396MB <WDC WD1000JB-32CWE0> [193821/16/63] at ata2-master UDMA100
> ad6: 95396MB <WDC WD1000JB-32CWE0> [193821/16/63] at ata3-master UDMA100
>
> which I then fdisk and disklabel under -current shows up as:
>
> 8 partitions:
> #        size   offset    fstype   [fsize bsize bps/cpg]
>   c: 195371505        0    unused        0     0        # (Cyl.    0 - 193820*)
>
> The only difference being the offset of 0 (and lack of warning msgs).

Labels created under -current with GEOM have slice-relative offsets and there
is no conversion by the ioctl, so disklabel(8) is happy.  The labels are
just incompatible, so they don't work under 4.7 or -current without GEOM.

> Both systems come up with the same disk size, but the offsets not matching
> seems to be a problem. An older 4.7 pre-release  system from Sep 16 creates
> the 'c' slice with an offset of 0.  I don't think this is something I did
> wrong. Any thoughts, comments, or pointy hats are welcome.

The end result of the incompatibilities is that you can't share labeled
slices between 4.7, etc. and -current if the labels were created under
-current.  To share them, label them on a non-broken system and put up
with the warnings from the New World Order.

Bruce


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?20021026162002.O6872-100000>