How do I determine the block size of an ext3 partition on Linux?

link|improve this question

40% accept rate
feedback

6 Answers

up vote 15 down vote accepted
# tune2fs -l /dev/sda1 | grep -i 'block size'
Block size:               1024

Replace /dev/sda1 with the partition you want to check.

link|improve this answer
feedback

On x86, a filesystem block is just about always 4KiB - the default size - and never larger than the size of a memory page (which is 4KiB).

link|improve this answer
This is the same on every platform, the largest block size is supported by ext2/3 is 4096 bytes. – Dave Cheney Jun 23 '09 at 10:06
Thanks Dave! I learned something today ;-) I originally thought the ext3 blocksize could be 8k on platforms that supported 8k memory pages. – wzzrd Jun 23 '09 at 12:44
Wikipedia says it can be 8k: en.wikipedia.org/wiki/Ext3#Size_limits – dfrankow Apr 25 at 22:41
@dfrankow: if you have 8k memory pages, such as on Alpha hardware, yes. But you do not have those on x86 hardware and that is what I was talking about. – wzzrd Apr 26 at 8:03
feedback

dumpe2fs -h /dev/md2

will output something with:

Block size: 4096 Fragment size: 4096

link|improve this answer
feedback

dumpe2fs |grep Block

link|improve this answer
feedback

fdisk will give you this information.

link|improve this answer
fdisk does not show the size of a filesystem block. A sector yes, a cylinder yes, but not blocks. – wzzrd Jun 23 '09 at 6:43
feedback

df -h

du-h

fdisk

above 3 command will give size of block in all most all the distro..

link|improve this answer
1  
No, they don't. df shows free disk space, du shows disk usage and fdisk show partition information. Neither show the size of a filesystem block. – wzzrd Jun 23 '09 at 6:41
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.