From owner-freebsd-scsi@FreeBSD.ORG Fri Dec 17 12:10:00 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1F0B1065670; Fri, 17 Dec 2010 12:10:00 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (muon.cran.org.uk [IPv6:2a01:348:0:15:5d59:5c40:0:1]) by mx1.freebsd.org (Postfix) with ESMTP id 5CA8F8FC08; Fri, 17 Dec 2010 12:10:00 +0000 (UTC) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id 54131E61DE; Fri, 17 Dec 2010 12:09:59 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cran.org.uk; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=mail; bh=nPcipAg/HfM7 4qjZb9vZfrfnMN8=; b=IllPKgY3BbLDHFf9Qiue1OGysw7XDEOvB2PXHXf0N1Qr yJxsMxwLUgX9Prwz5tAhfZBkRB1f31IOD17xQ/vfR77eLtRuIW3Mz0/oB9DTP2Hd 7sMZgsVOiM1EP6wQbceInK2nwGTg4+hVU5so6xFx22UtrEjETp35Ytf8A9+PbIU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=cran.org.uk; h=date:from:to :cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=mail; b=AROE8Y M2F1sIp0n5B7vHlBhlO3dt8xNAToGfzuCNdtKlpF93hRdJ3XsKzDiIkZPiAaSfpa 7vIs4fU7gH5uE1AY0LWotAKNgwzXFCtwkFPdrFki/V7Op3N3EPlDfLrvmoMkt8iA rYUw5V4PGY7LH4YsY88QO49S5nGnqfWJSdBX0= Received: from unknown (client-86-29-47-22.glfd.adsl.virginmedia.com [86.29.47.22]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA id 1FE74E60D1; Fri, 17 Dec 2010 12:09:59 +0000 (GMT) Date: Fri, 17 Dec 2010 12:09:55 +0000 From: Bruce Cran To: Alexander Best Message-ID: <20101217120955.00005f5a@unknown> In-Reply-To: <20101217115526.GA20772@freebsd.org> References: <20101217115526.GA20772@freebsd.org> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.16.0; i586-pc-mingw32msvc) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@freebsd.org Subject: Re: "camcontrol identify ada0" and "diskinfo -v ada0" reporting different cylinders count X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Dec 2010 12:10:00 -0000 On Fri, 17 Dec 2010 11:55:26 +0000 Alexander Best 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