Subject: Re: Of SCSI disks and things amiss
To: None <tech-kern@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: tech-kern
Date: 03/01/1996 11:02:14
> If a disk reported the *actual* size, would it not be possible tell
> which sectors were phsically in the same cylinder?
No, unfortunately one can't. There is no way to ask the disk itself,
and with modern disks the sectors-per-track value varies depending on
the cylinder number, so you can't work it out from the cylinder number
without knowing the details of _how_ sec/trk varies with cylno.
> ie, if you divided the total disk by the number of heads, you could
> theoretically calculate the offset of each platter. And if a sectors
> were at any common offset from each platter, they would be in the
> same cylinder.
I think you have the ordering wrong. The assumption is (I don't know
whether this is valid nowadays or not) that cylinder number is the
most-significant part of the sector number, and what you say sounds as
though you think it's in the middle.
That is, if we ignore variable-geometry disks (that is, pretend that
sectors-per-track is fixed), the relation is
a = s + (ns * (t + (nt * c)))
where
a = absolute sector number, from beginning of disk
s = sector number from beginning of track
(ie, rotational position)
t = track number
(ie, vertical position, which head to use)
c = cylinder number
(ie, radial position, where to seek to)
ns = number of sectors in one track
nt = number of tracks (ie, head count)
But what you wrote sounds to me as though you think it's
a = s + (ns * (c + (nc * t)))
where
nc = number of cylinders
others as above
Indeed, this raises the unpleasant possibility that some disk maker may
have decided to _not_ make cylinder number the most-significant part of
the absolute sector number, in which case _all_ the assumptions about
disk layout go right out the window.
der Mouse
mouse@collatz.mcrcim.mcgill.edu