Subject: Re: NetBSD calculates sd geometry oddly?
To: None <,>
From: Wolfgang Solfrank <>
List: netbsd-users
Date: 05/10/1995 15:00:54
>    I've noticed twice now that NetBSD sometimes decides scsi disks have less
>    sectors on them than other operating systems.
> I don't know offhand why this is.  Maybe the other systems are
> calculating it based on the (fake) geometry, and are including the
> slip sectors?

What NetBSD does is query the drive for the total number of sectors, the
number of heads and the number of cylinders. It then guesstimates the
number of sectors per track is the integral part of the division of
the total number of sectors by the number of heads and the number of
cylinders. Multiplying this again gives a number that may be less than
the original number of sectors.

The relevant code(sd.c, around line 820) has a comment like this:

                 * KLUDGE!! (for zone recorded disks)
                 * give a number of sectors so that sec * trks * cyls
                 * is <= disk_size
                 * can lead to wasted space! THINK ABOUT THIS !

And later, when the result is assigned to the disk_parms structure:

                dp->sectors = sectors;  /* XXX dubious on SCSI */

Just to clarify things.
ws@TooLs.DE     (Wolfgang Solfrank, TooLs GmbH) 	+49-228-985800