5

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.)

  • What abouit btrfs filesystem df /subvol ? – phoops May 10 '14 at 17:51
  • 3
    @edvinas.me: Nope, it shows me the same output as btrfs filesystem df / (the command called on the root of the btrfs file system). I should add that the version of my userspace tools is v0.20-rc1 and that I use the current Ubuntu 13.10 kernel (3.11.0-20-generic #35-Ubuntu), though I don't want to narrow the question down to old versions if it is possible in current or future releases. – Perseids May 10 '14 at 22:45
3

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/

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.