slighly off point post, but recording for reference.
MBR 512n
Disk /dev/sda: 17.2 GB, 17179869184 bytes, 33554432 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00006e8c
GPT 512n
Disk /dev/sda: 36003.6 GB, 36003637100544 bytes, 70319603712 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt
Disk identifier: 3DAC1844-EDDA-43CD-9334-E0F3515F0AC7
MBR 512e
Disk /dev/sda: 1098.4 GB, 1098437885952 bytes, 2145386496 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x00000000
4Kn
Disk /dev/sda: 999.0 GB, 998997229568 bytes, 243895808 sectors
Units = sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: gpt
Disk identifier: 4CD4D7DC-B85C-47B5-A8D0-BCFA2345A58D
I’m sure there is a better way…
fdisk -l /dev/sda|grep -e "Sector size"|awk '{print $4, $7}'
There is
fdisk -l /dev/sda|awk '/Sector size/{print $4, $7}'