Thursday, October 7, 2010

Finding default block size in Linux

How to find default block size in Linux?
# tune2fs -l /dev/sda1 | grep Block
Block count:                4980736
Block size:                    4096
Blocks per group:     32768
From this example, you can see that the default block size for the filesystem on /dev/sda1 partition is 4096 bytes, or 4k. That's the default block size for ext3 filesystem.    

How to define the block size while creating  ext3 filesystem ?


 # mkfs.ext3 –b <block size>  <Device>
Example:   # mkfs.ext3 -b 2048 /dev/sda1                
This creates a filesystem with 2KB block size on partition /dev/sda1.


  1. Thank you Ashok for the valuable information.

    1. Hi Ashok,

      I like your blog very much...Its amazing..

      Could you please keep a post for find command for finding large size files, large files generating directories in different ways...Generally we will see all basic types of commands in google search..but we want to see different types of commands in your blog style...

      Thank you...

    2. Hello,

      Thanks for your comments.

      I've already posted few posts on using 'find' command to find huge-sized files and report it. Please have a look at these following posts: