[Storage] Incorrect numbers when using multiple btrfs subvolumes, or when /home and / are not separate filesystems
Steps to reproduce:
- Have the following system layout: Both
/
and/home
are subvolumes within one btrfs partition - Run GNOME usage
- Switch to "Storage"
What happens: GNOME storage shows incorrect numbers, claiming e.g. that my operating system takes 169.8GB.
What should happen:
Display real storage usage. My operating system only takes about 24GB according to du -d 1 /
(run as root; "operating system" = size of /
- size of /home
).
Additional information:
I guess that the information is based on df
output (or its source), which is misleading and has been misinterpreted here.
$ LC_ALL=C df
Filesystem 1K-blocks Used Available Use% Mounted on
[…]
/dev/dm-0 314570752 165843376 145725232 54% /
/dev/dm-0 314570752 165843376 145725232 54% /home
[…]
Storage layout:
/dev/sda
/dev/sda1
/dev/sda2 /boot
/dev/sda3: btrfs (within dm-crypt container)
subvolume 1: /
subvolume 2: /home
subvolume 3: /var
Edited by Michael Catanzaro