Re: btrfs thinks fs is full, though 11GB should be still free

Christoph Anton Mitterer
2023-12-11T22:30:10Z

Hey Qu

On Tue, 2023-12-12 at 07:27 +1030, Qu Wenruo wrote:
> Is your current mounted subvolume the fs tree? Or already the data
> subvolume?

Well actually both, I always have a "service" mountpoint of the root
volume as well, and just unmounted that to no confuse with "double"
mount entries.

In reality it looks like:
# mount | grep vdb
/dev/vdb on /data/main type btrfs (rw,noatime,space_cache=v2,subvolid=257,subvol=/data)
/dev/vdb on /data/btrfs-top-level-subvolumes/data-main type btrfs (rw,noatime,space_cache=v2,subvolid=5,subvol=/)

But all data (except for 2 empty dirs, where on other systems I would
place btrbk snapshots) is in the data subvolume:

data/btrfs-top-level-subvolumes/data-main# ls -al
total 16
drwxr-xr-x 1 root root 26 Feb 21 2023 .
drwxr-xr-x 1 root root 30 Nov 9 23:49 ..
drwxr-xr-x 1 root root 20 Feb 21 2023 data
drwx------ 1 root root 10 Feb 21 2023 snapshots
/data/btrfs-top-level-subvolumes/data-main# du --apparent-size --total -s --si *
29G data
10 snapshots
29G total

> If the latter case, there are some files you can not access from your
> current mount point.

No it's not that (that would have been quite embarrassing ^^).
/data/btrfs-top-level-subvolumes/data-main# tree -a snapshots/
snapshots/
└── btrbk

2 directories, 0 files

> Thus it's recommended to use qgroup to show a correct full view of
> the
> used space by each subvolume.

Uhm... qgroups? How would they help me here?

Cheers,
Chris.