BTRFS-USAGE-REPORT(1)
π BTRFS-USAGE-REPORT π
okay bestie, so this is the manual page for btrfs-usage-report, which lives in section 1 of the Btrfs Usage Report manual. yes it's a real thing, yes it's iconic, let's get into it β¨
πΈ NAME πΈ
btrfs-usage-report β bestie, it shows you a detailed usage report about your btrfs filesystem. that's the whole job. no cap. π
π¦ SYNOPSIS π¦
btrfs-usage-report [args] mountpoint
β¨ DESCRIPTION β¨
so the btrfs-usage-report program shows a detailed report about how a btrfs filesystem is using the disk space it has. that's it. that's the vibe. π
okay but here's the thing, the filesystem you want info about needs to be online and mounted. and because the info it needs is pulled straight out of the btrfs kernel API, you have to run it as root. no way around it, sorry babe, it's giving sudo energy. π
now let's talk about why this tool even exists, because btrfs is a whole situation. in a btrfs filesystem, raw storage is shared between data of different types (System, MetaData and Data) and different profiles (like single, DUP, RAID1, etc). and also, one filesystem can have multiple block devices of different sizes attached. all of that together? absolutely confuses regular tools like df, which will already fail to show you how much free space you still have to add more data to the filesystem. df is not the moment. π
so here's what the report will show you:
- Physical disk space usage. at this level we can see how much disk space is allocated for specific combinations of type and profile. e.g.
1GiBof Data with profile RAID1 will show that two devices both store1GiBof raw data, because it's duplicated. the way that math works is so real. π - Virtual disk space usage. the btrfs virtual address space shows the amount of data we store, disregarding the storage profile. so if we store
1GiBof data using a RAID1 profile, then the virtual address space shows we have1GiBof data, while the physical space usage will show up as2GiBin total. iconic behaviour honestly. and heads up bestie β note that when using compression, the virtual address space counts compressed data instead of uncompressed data. π«Ά - Estimated free virtual space left for use. by extrapolating the current usage patterns, a prediction can be made that shows how much extra data can be added to the filesystem. these are the values you actually wish
dfwould show you. these are the main character numbers. β - Unallocatable disk space, which is raw physical disk space that cannot be used, either because allocations in the filesystem are unbalanced, or because you've got different sizes of devices attached. additionally, it will show us if disk space can be reclaimed for use by using
btrfs balance. and when you're converting between profiles, these values can quickly show you if the conversion to another profile can actually be completed or not. super useful, no notes. π
π OPTIONS π
-h,--helpβ shows the built-in help message and exits. that's it, she's simple, she's helpful, she ate. π
π SEE ALSO π
btrfs-space-calculator is a program that can calculate the amount of allocatable (and unallocatable) disk space based on a list of (maybe differently sized) block devices and target profiles to use. sister program, equally slay. π¦
this program is an example of what can be done using the python-btrfs library. and bestie, listen β do not parse the output of this program, because it just displays data that is readily available when using functionality from this library. like, just use the library, i'm begging. π
source and documentation on github: https://github.com/knorrie/python-btrfs β¨
π«Ά okay that's the whole page! this was Btrfs Usage Report manual, dated 2018, and honestly? she's still serving. go check your filesystem, bestie, and remember: run it as root, don't parse the output, and stay hydrated. ππΈβ¨
π¦ where this page comes from
- debian bookworm: python3-btrfs 13-1 Β· LGPL-3.0-only
- debian trixie: python3-btrfs 15-1 Β· LGPL-3.0-only
- fedora 43: python3-btrfs 15-5.fc43 Β· LGPL-3.0-or-later AND LicenseRef-Callaway-MIT
- fedora 44: python3-btrfs 15-6.fc44 Β· LGPL-3.0-or-later AND LicenseRef-Callaway-MIT
- ubuntu jammy: python3-btrfs 12-2 Β· LGPL-3.0-only
- ubuntu noble: python3-btrfs 13-1 Β· LGPL-3.0-only
- ubuntu resolute: python3-btrfs 15-1 Β· LGPL-3.0-only
- ubuntu stonking: python3-btrfs 15-1 Β· LGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms