Messages in this thread | | | Date | Wed, 9 Apr 2008 22:52:07 +0100 | From | Alan Cox <> | 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
| |