VMware Cloud Community
JamesConaway
Enthusiast
Enthusiast
Jump to solution

ESX disk geometry math

I am trying to understand the math in how the VMFS LUN's are structured.

If I do a fdisk -lu and get the following output:

Disk /dev/sdg: 536.9 GB, 536952700928 bytes

255 heads, 63 sectors/track, 65280 cylinders, total 1048735744 sectors

Units = sectors of 1 * 512 = 512 bytes

Device Boot Start End Blocks Id System

/dev/sdg1 128 1048723199 524361536 fb VMware VMFS

The math adds up when it comes to calculating the total disk size based on 1048735744 sectors output.

1048735744 * 512 = 536952700928 bytes. 536952700928 / 1024 /1024/1024 = 500gb LUN.

It states the total sectors as 1048735744.

I calculate the total sectors as heads * sectors * cylinders = 1048723200

Which is one more than the ending sector size.

Where is the difference between the 1048735744 and the 1048723200 be used? and how is the 1048735744 being calculated?

If you found this at all helpful please award points by using the correct or helpful buttons! Thanks!
0 Kudos
1 Solution

Accepted Solutions
VTsukanov
Virtuoso
Virtuoso
Jump to solution

Since INT 0x13 interface supports drives of sizes up to about 528 MB (Physical CHS addressing), then to support larger disks was introduced in INT13h EXT, it uses 64-bit logical block addressing (LBA). The CHS Value in LBA mode are calculated. Take a look at LBA to CHS Translation

In your case

CYL = Trunc (1048735744 / (255 * 63)) = 65280

View solution in original post

0 Kudos
1 Reply
VTsukanov
Virtuoso
Virtuoso
Jump to solution

Since INT 0x13 interface supports drives of sizes up to about 528 MB (Physical CHS addressing), then to support larger disks was introduced in INT13h EXT, it uses 64-bit logical block addressing (LBA). The CHS Value in LBA mode are calculated. Take a look at LBA to CHS Translation

In your case

CYL = Trunc (1048735744 / (255 * 63)) = 65280

0 Kudos