[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080409225207.732faa4e@core>
Date: Wed, 9 Apr 2008 22:52:07 +0100
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: lsorense@...lub.uwaterloo.ca (Lennart Sorensen)
Cc: Francis Moreau <francis.moro@...il.com>,
linux-kernel@...r.kernel.org
Subject: Re: Disk geometry from /sys
> Why do you want to know what cylinder size the hard disk pretents to
> have? What use could it be? Harddisks have varying numbers of sectors
It matters on a CHS addressed device - vaguely.
> drive. All that matters on a modern drive is the total number of
> sectors since all access is done by requesting a specific sector number
> starting from the begining of the drive. Where it is physically located
> is none of software's business, and it may not even be adjacent to the
> sector with a number right next to the requested one due to defect
> management and various optimizations.
And some other OS's make certain assumptions about layout that must agree
with that OS view of the disk. A good general rule is to believe the
partition table information if present and if not use SG_IO to issue an
IDENTIFY to any ATA or CFA drive to see how it has mapped the device.
Even better make use fo the existing tools whenever possible - disk
partitioning is more like magic than science
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists