Skip to contentSkip to conversation

find subvolume (used) size?

DISCUSSION Tomasz Chmielewski 3 participants 5 messages Oct 5, 2010 – Oct 6, 2010 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Since CoW / reflink does not seem to work between subvolumes (a bug or a feature?), is it somehow possible to get the subvolume (used) size?

There is a standard df tool, but it can be a lengthy process for filesystems with lots of files.

"btrfs filesystem df" only shows total size for the whole btrfs filesystem.

Say, I create subvolumes called public, office, staff and pack a lot of files there. Does btrfs somehow allows to get the current size of these subvolumes (other than using df tool to traverse all files and directories)?

Signature · 2 lines
Tomasz Chmielewski
http://wpkg.org
#1 lore raw
Quoted 2 lines · Tomasz Chmielewski

There is a standard df tool, but it can be a lengthy process for filesystems with lots of files.

Maybe you mean du? df takes almost no time at all and does not care how many files there are.

#2 lore raw
Quoted 6 lines · Phillip Susi
Quoted 2 lines · Tomasz Chmielewski

There is a standard df tool, but it can be a lengthy process for filesystems with lots of files.

Maybe you mean du? df takes almost no time at all and does not care how many files there are.

Yep, I certainly meant du there.

Signature · 2 lines
Tomasz Chmielewski
http://wpkg.org
#3 lore raw

Tomasz Chmielewski, Tue, 05 Oct 2010 18:07:58 +0200:

Quoted 10 lines · Phillip Susi
Quoted 6 lines · Tomasz Chmielewski
Quoted 2 lines

There is a standard df tool, but it can be a lengthy process for filesystems with lots of files.

Maybe you mean du? df takes almost no time at all and does not care how many files there are.

Yep, I certainly meant du there.

Just be carefull, because for example if you use -o compress, the space the files are actually using can be different...

Lubos

#4 lore raw
In reply to Phillip Susi
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Maybe you mean du? df takes almost no time at all and does not care how many files there are.

Yep, I certainly meant du there.

Just be carefull, because for example if you use -o compress, the space the files are actually using can be different...

Certainly, one more reason why btrfs reporting subvolume size usage would be useful ;)

Signature · 2 lines
Tomasz Chmielewski
http://wpkg.org