1

I am a beginner in Linux. I created a Hard-Disk size 1GB through VM and am using CentOS 6.4 I scanned and discovered it using echo command.

When I do fdisk -l /dev/sdi , I get the following output

Disk /dev/sdi: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

The first line is size that I understand, but can anyone please explain the calculation here regarding the heads, sectors, cylinders, etc. and the remaining other lines.

muru
  • 72,889

1 Answers1

1

Heads/sectors/cylinders have long been deprecated and used only for compatibility with old OSes and utilities. More info on them here: https://en.wikipedia.org/wiki/Cylinder-head-sector#Blocks_and_clusters

Sector is a physical unit of storing data and it can be either 512 or 4096 bytes: https://en.wikipedia.org/wiki/Disk_sector

I/O size: says how much data the disk reads or writes regardless of how much data you've asked it to read/write.

Disk Identifier is piece of info from MBR which should be unique for all your disks: https://en.wikipedia.org/wiki/Master_boot_record#Disk_identity

If sector or I/O size are equal to 4096 bytes, your partitions should be aligned or your IO throughput may suffer a lot: https://en.wikipedia.org/wiki/Advanced_Format#4Kn Most modern disk partitioning utilities do it automatically.

  • Regarding the definition of "I/O size" being the amount of data read in one go: I still don't understand — isn't that just the definition of the logical sector size, which is stated right above it? What else is the point of a logical sector size if not to define the atomic size of the chunks with which you interface with the drive? – Andreas Dec 25 '22 at 20:48