When I read the partition table (MBR or GPT) from a device, are the numbers in units of logical block size, or nominal 512-byte sectors? Surprisingly, I couldn't find the canonical answer through googling.
Conclusion has been reversed based on further investigation
Although almost all drives use 512-byte logical sectors, modern partition tables use LBA addresses, and LBA unit size is the logical sector size of the device, which today may be as great as 4096 bytes.
In the end I posted the question about unit size to the main GNU parted (partition editor) mailing list and have received this response. Specifically:
"LBA always refers to the drive's block size. So it may be 512 or 4096 or some other value, depending on what the drive reports."
Incorrect previous answer version: [[Partition tables (in the MBR and otherwise) refer to 512 byte blocks / logical sectors. See for example https://en.wikipedia.org/wiki/Master_boot_record#PTE.]]
Background information
Reporting of disk physical disk sector sizes seems to be fundamentally done through commands in the ATA-8 specification, specifically the "IDENTIFY DEVICE" command. Compatibility issues (most often discussed) are alignment of I/O operations. Apparently most drives handle 512 byte alignment, but with performance penalties, though there are some drives advertised as "4k native" or "4kn" that do not support 512 byte aligned I/O at all. In general, drives with physical 4k sectors use what is called "Advanced Format", which may help you search if you want more info.
This article https://linuxconfig.org/linux-wd-ears-advanced-format has some relatively clear discussion, especially if you are a Linux user. For what it's worth, on Linux the "parted -l" command reports physical and logical sector size, and parted also knows how to align partitions appropriately for Advanced Format devices.
Also, you might find this article http://www.seagate.com/tech-insights/advanced-format-4k-sector-hard-drives-master-ti/ informative and reassuring on the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With