Several BTRFS warnings on shutdown

Hey there, my system works fine but everytime I shutdown I see the following warnings for a moment, before it shuts down:

dracut Warning: Killing all remaining processes
BTRFS warning (device dm-1): qgroup 0/266 has unreleased space, type 0 rsv 210718208
BTRFS warning (device dm-1): qgroup 0/265 has unreleased space, type 0 rsv 131072
BTRFS warning (device dm-1): qgroup 0/262 has unreleased space, type 0 rsv 324243456
BTRFS warning (device dm-1): qgroup 0/261 has unreleased space, type 0 rsv 319488
BTRFS warning (device dm-1): qgroup 0/257 has unreleased space, type 0 rsv 42987520
BTRFS error (device dm-1): qgroup reserved space leaked
dracut Warning: Unmounted /oldroot.

I’m using LVM.

Do you have any idea what does it mean and what I can do to to fix it?

qgroups are used in btrfs to track how much space is consumed by each subvolume. Something goes wrong with this accounting. btrfs does some sanity checks during unmount and those checks show some issues.

If you can reproduce it every time, then you can only report it to btrfs developers to find out the reason why this accounting mismatch happens.

report it to btrfs developers

Okay, where should I do it?

Thanks for the explanation.

Upstream mailing list is linux-btrfs@vger.kernel.org.

1 Like

I’ll try to ask there then. Thank you.

Hi, did you find any solution of this ? i get exactly the same warning and error while shutdown.

You may either disable quota or rescan, see man btrfs-quota.

i couldn’t fix the issues with rescan, so i got the idea to recreate a snapshot and rollback on it, all errors are now gone but i get " dracut Warning: Unmounted /oldroot. " is this a problem at all?

It could be a problem. Does it still occur after rebooting?

ok the errors reappeared when opensuse started creating new snapshots again, so I simply deactivated the quotas, there will be no harmful consequences on the installation, on the snapshots? of course I made the effort to read the btrfs-qgroup and btrfs-quota help pages, but it’s pretty complicated to understand for a simple user like me. I’ve never activated them manually.

 turkishyordle@host:~> sudo btrfs qgroup show /
ERROR: can't list qgroups: quotas not enabled
turkishyordle@host:~> sudo btrfs qgroup show /.snapshots
ERROR: can't list qgroups: quotas not enabled

btw the rescan had no effect either, unless my command was wrong, I typed “sudo btrfs quota rescan /.snapshots” but nothing happened

You may safely disable quotas. On the other hand the existence of some unknown problems is disturbing. You may try and clear caches (your device path may differ):

btrfs check --force --clear-ino-cache /dev/nvme0n1p2
btrfs check --force --clear-space-cache v2 /dev/nvme0n1p2

Quotas are enabled by default. If you don’t need them disable.