Re: Disk geometry from /sys

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Seewer Philippe <philippe.seewer@...>
Cc: Francis Moreau <francis.moro@...>, <linux-kernel@...>
Date: Friday, April 18, 2008 - 9:22 am

Seewer Philippe wrote:
..

That can sound a bit misleading.  The complete story, for ATA/SATA drives,
is that the disk has two geometries:  an internal physical one, with a 
fixed number of heads and cylinders, but variable sectors/track
(which normally varies by cylinder zone).

Software *never* sees or knows about that geometry, so ignore it.

The second geometry, is the one that the drive reports to software
as its "native" geometry.  This is what you see from "hdparm -I"
and friends, and this geometry is what has to be used by software
when using cylinder/head/sector (CHS) addressing for I/O operations.
The hardware interface has a limit of 4-bits for the head value,
so the maximum number of heads can never be more than 16.

Nobody uses CHS addressing for I/O operations, at least not on
any hardware newer than at least ten years old, so this geometry
is also unimportant for most uses.

That's what the drive knows about.

Software, for compatibility with the MS-DOS partition table scheme,
sometimes uses a "logical" geometry, where we "pretend" that a drive
can have up to 255 heads, which then allows more of the disk to be
described within the limitations of the partition table data layout.
That's where one frequently sees "255 heads", even though the drive
underneath uses 16 at the interface level, and probably as only 2
or 4 real heads inside the shell.

Cheers
 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Disk geometry from /sys, Francis Moreau, (Wed Apr 9, 4:53 pm)
Re: Disk geometry from /sys, Seewer Philippe, (Mon Apr 14, 8:57 am)
Re: Disk geometry from /sys, Francis Moreau, (Tue Apr 15, 3:40 am)
Re: Disk geometry from /sys, Seewer Philippe, (Wed Apr 16, 3:49 am)
Re: Disk geometry from /sys, Francis Moreau, (Thu Apr 17, 10:09 am)
Re: Disk geometry from /sys, Seewer Philippe, (Thu Apr 17, 10:49 am)
Re: Disk geometry from /sys, Francis Moreau, (Tue Apr 22, 4:10 pm)
Re: Disk geometry from /sys, Seewer Philippe, (Wed Apr 23, 2:48 am)
Re: Disk geometry from /sys, Mark Lord, (Fri Apr 18, 9:22 am)
Re: Disk geometry from /sys, Francis Moreau, (Tue Apr 22, 4:16 pm)
Re: Disk geometry from /sys, Mark Lord, (Tue Apr 22, 6:44 pm)
Re: Disk geometry from /sys, Francis Moreau, (Wed Apr 23, 3:02 am)
Re: Disk geometry from /sys, Mark Lord, (Wed Apr 23, 9:47 am)
Re: Disk geometry from /sys, Seewer Philippe, (Wed Apr 23, 5:33 am)
Re: Disk geometry from /sys, Seewer Philippe, (Wed Apr 23, 2:53 am)
Re: Disk geometry from /sys, Seewer Philippe, (Fri Apr 18, 9:37 am)
Re: Disk geometry from /sys, Francis Moreau, (Tue Apr 22, 4:11 pm)
Re: Disk geometry from /sys, Seewer Philippe, (Wed Apr 23, 2:44 am)
Re: Disk geometry from /sys, Francis Moreau, (Wed Apr 23, 2:56 am)
Re: Disk geometry from /sys, Bill Davidsen, (Thu Apr 10, 9:58 am)
Re: Disk geometry from /sys, linux-os (Dick Johnson), (Thu Apr 10, 8:22 am)
Re: Disk geometry from /sys, Francis Moreau, (Thu Apr 10, 3:15 pm)
Re: Disk geometry from /sys, Mark Lord, (Wed Apr 9, 5:57 pm)
Re: Disk geometry from /sys, Francis Moreau, (Thu Apr 10, 3:05 pm)
Re: Disk geometry from /sys, Mark Lord, (Thu Apr 10, 3:53 pm)
Re: Disk geometry from /sys, Lennart Sorensen, (Wed Apr 9, 5:28 pm)
Re: Disk geometry from /sys, Francis Moreau, (Thu Apr 10, 3:23 pm)
Re: Disk geometry from /sys, Bernd Eckenfels, (Wed Apr 9, 6:16 pm)
Re: Disk geometry from /sys, Lennart Sorensen, (Thu Apr 10, 10:52 am)
Re: Disk geometry from /sys, Alan Cox, (Wed Apr 9, 5:52 pm)