"camcontrol identify ada0" and "diskinfo -v ada0" reporting
different cylinders count
Bruce Cran
bruce at cran.org.uk
Fri Dec 17 12:10:00 UTC 2010
On Fri, 17 Dec 2010 11:55:26 +0000
Alexander Best <arundel at freebsd.org> wrote:
> 484518 # Cylinders according to firmware.
> 16 # Heads according to firmware.
> 63 # Sectors according to firmware.
> ...
> cylinders 16383
> heads 16
> sectors/track 63
>
> ...so how many cylinders does my hdd have?
It almost certainly doesn't have 8 platters for a start, and neither
does it have 63 sectors per track. CHS is obsolete - the ATA-7
specification has marked the fields as obsolete and all disks made in
the last 10 (maybe even 15?) years have used LBA.
camcontrol displays what the disk reports via the IDENTIFY command
(I'm not sure if it's the "current" or default geometry it reports):
ATA says that disks larger than can be represented using CHS should
report having 16383 cylinders, which is needed for compatibility with
BIOSes. diskinfo just appears to take the size of the disk,
assume 16 heads and 63 sectors per track and put the rest into
cylinders.
There's another set of CHS values, and that's in geom: check for
"fwheads" and "fwsectors" in "gpart list".
See
http://lists.freebsd.org/pipermail/svn-src-head/2010-December/023134.html
for a (very!) detailed discussion of the various ways of calculating
CHS values. Unfortunately no decision was reached so it looks like
we're going to have a mismatch between camcontrol, diskinfo, geom, cam
and ata for a while yet.
--
Bruce Cran
More information about the freebsd-scsi
mailing list