2 added 790 characters in body
source | link

These two tools, seems to report different blockblock sizes

root@ubuntu-xenial:~# df
Filesystem     1K-blocks     Used Available Use% Mounted on
udev              498588        0    498588   0% /dev
tmpfs             101584     3116     98468   4% /run
/dev/sda1       10098468  1438288   8643796  15% /
tmpfs             507916        0    507916   0% /dev/shm
tmpfs               5120        0      5120   0% /run/lock
tmpfs             507916        0    507916   0% /sys/fs/cgroup
vagrant        343946960 55977016 287969944  17% /vagrant
tmpfs             101584        0    101584   0% /run/user/1000

root@ubuntu-xenial:~# dumpe2fs /dev/sda1 | grep -i block | grep -i size
dumpe2fs 1.42.13 (17-May-2015)
Block size:               4096
Flex block group size:    16

What is more, fdisk command reports different sector size (aren't the terms sector and block interchangeable?)

root@ubuntu-xenial:~# fdisk -l
Disk /dev/sda: 10 GiB, 10737418240 bytes, 20971520 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: 0x38d40272

Device     Boot Start      End  Sectors Size Id Type
/dev/sda1  *     2048 20971486 20969439  10G 83 Linux


Disk /dev/sdb: 10 MiB, 10485760 bytes, 20480 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

I am on a vagrant machine for what that matters

These two tools, seems to report different block sizes

root@ubuntu-xenial:~# df
Filesystem     1K-blocks     Used Available Use% Mounted on
udev              498588        0    498588   0% /dev
tmpfs             101584     3116     98468   4% /run
/dev/sda1       10098468  1438288   8643796  15% /
tmpfs             507916        0    507916   0% /dev/shm
tmpfs               5120        0      5120   0% /run/lock
tmpfs             507916        0    507916   0% /sys/fs/cgroup
vagrant        343946960 55977016 287969944  17% /vagrant
tmpfs             101584        0    101584   0% /run/user/1000

root@ubuntu-xenial:~# dumpe2fs /dev/sda1 | grep -i block | grep -i size
dumpe2fs 1.42.13 (17-May-2015)
Block size:               4096
Flex block group size:    16

I am on a vagrant machine for what that matters

These two tools, seems to report different block sizes

root@ubuntu-xenial:~# df
Filesystem     1K-blocks     Used Available Use% Mounted on
udev              498588        0    498588   0% /dev
tmpfs             101584     3116     98468   4% /run
/dev/sda1       10098468  1438288   8643796  15% /
tmpfs             507916        0    507916   0% /dev/shm
tmpfs               5120        0      5120   0% /run/lock
tmpfs             507916        0    507916   0% /sys/fs/cgroup
vagrant        343946960 55977016 287969944  17% /vagrant
tmpfs             101584        0    101584   0% /run/user/1000

root@ubuntu-xenial:~# dumpe2fs /dev/sda1 | grep -i block | grep -i size
dumpe2fs 1.42.13 (17-May-2015)
Block size:               4096
Flex block group size:    16

What is more, fdisk command reports different sector size (aren't the terms sector and block interchangeable?)

root@ubuntu-xenial:~# fdisk -l
Disk /dev/sda: 10 GiB, 10737418240 bytes, 20971520 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: 0x38d40272

Device     Boot Start      End  Sectors Size Id Type
/dev/sda1  *     2048 20971486 20969439  10G 83 Linux


Disk /dev/sdb: 10 MiB, 10485760 bytes, 20480 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

I am on a vagrant machine for what that matters

1
source | link

Getting block size via df vs dumpe2fs

These two tools, seems to report different block sizes

root@ubuntu-xenial:~# df
Filesystem     1K-blocks     Used Available Use% Mounted on
udev              498588        0    498588   0% /dev
tmpfs             101584     3116     98468   4% /run
/dev/sda1       10098468  1438288   8643796  15% /
tmpfs             507916        0    507916   0% /dev/shm
tmpfs               5120        0      5120   0% /run/lock
tmpfs             507916        0    507916   0% /sys/fs/cgroup
vagrant        343946960 55977016 287969944  17% /vagrant
tmpfs             101584        0    101584   0% /run/user/1000

root@ubuntu-xenial:~# dumpe2fs /dev/sda1 | grep -i block | grep -i size
dumpe2fs 1.42.13 (17-May-2015)
Block size:               4096
Flex block group size:    16

I am on a vagrant machine for what that matters