Ubuntu Pastebin

Paste from ubuntu at Thu, 10 Dec 2015 19:11:45 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
$ 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
Download as text