Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Dec 2010 12:09:55 +0000
From:      Bruce Cran <bruce@cran.org.uk>
To:        Alexander Best <arundel@freebsd.org>
Cc:        freebsd-scsi@freebsd.org
Subject:   Re: "camcontrol identify ada0" and "diskinfo -v ada0" reporting different cylinders count
Message-ID:  <20101217120955.00005f5a@unknown>
In-Reply-To: <20101217115526.GA20772@freebsd.org>
References:  <20101217115526.GA20772@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 17 Dec 2010 11:55:26 +0000
Alexander Best <arundel@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101217120955.00005f5a>