How to Find the Blocksize of an Ext2/Ext3/Ext4 FileSystem on Linux

Shahriar Shovon

Supported OS

  • All

Categories

Share this post with your friends

When we want to set up quotas on Linux, we need to specify the soft limit and hard limit on blocks unit. So the block size is very important here. This post is about how to find the block size of an ext2/ext3/ext4 filesystem. To find the blocksize of an ext2/ext3/ext4 partition, we can use the tune2fs command.

Example 1

To find the block size of partition /dev/sda1, run the following command. tune2fs -l /dev/sda1 | grep -i 'block size' Block size: 1024 From the output of the command, you can see that, the block size is 1024 bytes or 1 KB.

Example 2

To find the block size of partition /dev/mapper/testvg-testlv1 LVM filesystem, run the following command. tune2fs -l /dev/mapper/testvg-testlv1 | grep -i 'block size' Block size: 4096 From the output of the command, you can see that, the block size is 4096 bytes or 4 KB.

References:

ServerFault.com(how-do-i-determine-the-block-size-of-an-ext3-partition-on-linux) Tested on: Ubuntu 16.04 LTS