Subject: Re: fdisk problem with new disk
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Federico Lupi <flupi@mclink.it>
List: port-i386
Date: 07/26/2000 23:43:10
On Wed, Jul 26, 2000 at 10:52:49PM +0200, Manuel Bouyer wrote:
> On Wed, Jul 26, 2000 at 10:38:09PM +0200, Federico Lupi wrote:
> > I have added the following disk to a NetBSD machine:
> >   IBM  DCAS-32160, SCSI-3
> >   Formatted device capacity: 2.16GB
> >   Sector size: 512
> >   Data heads: 3
> >   Disks: 2
> > 
> > The output from dmesg is:
> >   sd0: 2063MB, 8188 cyl, 3 head, 172 sec, 512 bytes/sect x 4226725 sectors
> >                                                            ^^^^^^^ 
> > 
> > but 8188*3*172 is 4225008 and not 4226725.
> 
> hehe, real vs fake geometry. For modern disks the number of sector per track
> isn't constant (disk speed and density is constant, so something has to
> be variable :), so the above math does't work.
> Disk still reports C/H/S geometry but they don't exactly match the hardware.
> 
> --
> Manuel Bouyer <bouyer@antioche.eu.org>
> --

Thanks a lot for the answer (as usual :-)

If I understand correctly, the BIOS uses yet another "fake" geometry
which comes close to the total number of sectors but is not exact.  So,
as long as I stick to the BIOS geometry (cylinders: 524 heads: 128
sectors/track: 63 => 4225536 sectors) in partitioning everything will
be ok, although some sectors (4226725-4225536=1189 sectors= 594 KB)
will remain unused.

-- 
Federico Lupi

Home page
    http://www.mclink.it/personal/MG2508/