Re: Disk geometry from /sys
- From: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 9 Apr 2008 22:52:07 +0100
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- Disk geometry from /sys
- From: Francis Moreau
- Re: Disk geometry from /sys
- From: Lennart Sorensen
- Disk geometry from /sys
- Prev by Date: Re: mutex_unlock
- Next by Date: Re: [PATCH v2] documentation: build source files in Documentation sub-dir
- Previous by thread: Re: Disk geometry from /sys
- Next by thread: Re: Disk geometry from /sys
- Index(es):
Relevant Pages
|