Linux – How to get the size of a btrfs subvolume (compressed vs. uncompressed)

btrfslinux

Is there a command to get the on-disk size of a btrfs subvolume?

The file system was mounted with -o compressed and the subvolume contains a lot of files that should compress rather well. I could use du on the root folder but then I will only get the sum of the uncompressed sizes and it is also relatively slow compared to a df-like command.

(Note: This question is not about the size of the unique data contained in this subvolume and how much it derived from other snapshots in a COW fashion.)

Best Answer

I can't help with the compressed size, but enabling quotas seems to be the only way to see how much space is us ed by a subvolume.

See : http://dustymabe.com/2013/09/22/btrfs-how-big-are-my-snapshots/