I'm looking for the commands that will tell me the allocation quantum on drives formatted with ext4 vs btrfs.

Background: I am using a backup system that allows users to restore individual files. This system just uses rsync and has no server-side software, backups are not compressed. The result is that I have some 3.6TB of files, most of them small.

It appears that for my data set storage is much less efficient on a btrfs volume under LVM than it is on a plain old ext4 volume, and I suspect this has to do with the minimum file size, and thus the block size, but I have been unable to figure out how to get those sizes for comparison purposes. The btrfs wiki says that it uses the "page size" but there's nothing I've found on obtaining that number.


On ext4, just use tune2fs, as below

[root@centos8 ~]# tune2fs -l /dev/sda1 |grep "^Block size:"
Block size:               4096
[root@centos8 ~]#

Not familiar with btrfs, but perhaps btrfs inspect-internal dump-super -f ?

| improve this answer | |
  • 2
    Indeed that works for btrfs. Thanks. The relevant parts of the output are nodesize 16384 leafsize 16384 – instance Apr 11 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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