Ouput of fdisk explained

This article will explain the output of disk.

Here is sample fdisk output, listing the geometry of a disk, as well as its partitions.

$ fdisk -l /dev/sda

Disk /dev/sda: 19.3 GB, 19327352832 bytes
255 heads, 63 sectors/track, 2349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          65      522081   83  Linux
/dev/sda2              66        2349    18346230   8e  Linux LVM

We have a ~19GB drive.  You can picture a hard disk as being made up of multiple, circular platters.  Each platter is made up of multiple tracks. Tracks are concentric “circles” on the platter, which are in turn made up of sectors.  Sectors are 512 byte segments of data on the disk.  The “aligned” tracks on all of the platters cut an imaginary cylinder from the stacked platters.  As an example, if you have a disk with 10 platters, then track 22 from each platter would make a “cylinder”.  You can change the output of the fdisk command to either sectors or cylinders using the -u option.

Your output may different slightly.  Also note that fdisk cannot be used to create partitions larger than 2TB, due to limitations in the MBR (Master Boot Record) scheme.  For partitions larger than 2TB, you need to create GPT partitions using a tool such as parted.

How many sectors are in a cylinder?

According to our fdisk output above, a cylinder is made up of 63 sectors/track.
There are 255 heads (ie: tracks) on the disk.  (This is an abstraction.  The disk does not actually have 255 physical platters.)

To get the number of sectors/cylinder, multiply the two:

63 sectors per track * 255 heads (tracks) = 16065 sectors/cylinder

How many bytes are in a cylinder?

We found above that there are 16,065 sectors/cylinder.  To get the number of bytes per cylinder, multiply by 512.  This output actually directly given to us by fdisk in the example above.

16065 sectors/cylinder * 512 bytes/sector = 8,225,280 bytes per cylinder

 

This entry was posted in disk and tagged , , , , , , , . Bookmark the permalink.

Comments are closed.