[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dimensione disco




cat /proc/ide/hdb/capacity
320173056
e questo numero da dove viene? sembra sia il numero di KB * 2... ???
da http://www.happy-monkey.net/LPI/html/ch03.html


   3. IDE Disks and LBA

Exploration of the |/proc/ide| directory reveals information about IDE devices present in the system. Of particular interest is the |/proc/ide/hda| directory since it contains information about the first, bootable IDE hard disk in the system. Two files in the |/proc/ide/hda| directory, |capacity| and |geometry|, are used to describe the size of the hard disk. The example below shows the contents of the files for an 80G hard disk.

|bash#| cat /proc/ide/hda/geometry
physical     38322/16/255
logical      9732/255/63

|bash#| cat /proc/ide/hda/capacity
156355584

The output of |geometry| shows the size in a cylinder/head/sector (CHS) format while |capacity| shows the size in logical block addressing (LBA) format. The older CHS format is limited to 1024 cylinders and can only describe disks up to 8G in size. Because of this limitation modern hard disks are almost always described using LBA. The Linux kernel uses LBA exclusively and provides the CHS parameters in |geometry| for informational purposes only. Because the operating system uses LBA it is important that the PC BIOS also be configured to use LBA.



Reply to: