$ sfdisk --list /dev/vda
Disk /dev/vda: 20 GiB, 21474836480 bytes, 41943040 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
Disklabel type: dos
Disk identifier: 0x0006bf65
Device Boot Start End Sectors Size Id Type
/dev/vda1 * 2048 41943006 41940959 20G 83 Linux
$ blockdev --getsize64 /dev/vda
21474836480
$ blockdev --getsize64 /dev/vda1
21473771008
## this is in 512
$ cat /sys/class/block/vda/vda1/size
41940959
$ echo $((41940959*512))
21473771008
## /proc/partitions has 1024 byte blocks
$ grep vda1 /proc/partitions
253 1 20970479 vda1
$ echo $((20970479*1024))
21473770496
## How much different?
$ echo $((21473771008-21473770496))
512