For the past month or so, I’ve been getting the following pair of log entries about once an hour on a couple of my RPI4b’s running Tumbleweed, currently 20251022.
Nov 07 23:12:58 rpi4b.walkerstreet.info kernel: BTRFS warning (device sda2): qgroup marked inconsistent, qgroup info item update error -2
Nov 07 23:12:58 rpi4b.walkerstreet.info kernel: BTRFS info (device sda2): qgroup scan completed (inconsistency flag cleared)
Is this something I should be worried about? After doing some web searching (https://www.spinics.net/lists/linux-btrfs/msg147019.html), it seems that there are conditions that can cause frequent inconsistencies that are fixed with a rescan (as indicated by the second log entry of the pair). As far as I can tell, I’m not seeing any ill effects.
That looks consistent (at the time this information was captured). Can you check what jobs are running when you get the qgroup info item update error -2 error? Some btrfs maintenance jobs, snapshot creation, snapper cleanup or similar?
It seems to happen during a “Daily Cleanup of Snapper Snapshots” (which runs hourly). Here are logs for one of those hourly cleanups:
Nov 07 01:12:39 rpi4b.walkerstreet.info systemd[1]: Started Daily Cleanup of Snapper Snapshots.
Nov 07 01:12:39 rpi4b.walkerstreet.info systemd[1]: Starting DBus interface for snapper...
Nov 07 01:12:39 rpi4b.walkerstreet.info systemd-timesyncd[627]: Contacted time server 50.117.3.95:123 (2.opensuse.pool.ntp.org).
Nov 07 01:12:39 rpi4b.walkerstreet.info systemd[1]: Started DBus interface for snapper.
Nov 07 01:12:39 rpi4b.walkerstreet.info systemd-helper[320190]: Running cleanup for 'root'.
Nov 07 01:12:39 rpi4b.walkerstreet.info systemd-helper[320190]: Running number cleanup for 'root'.
Nov 07 01:12:51 rpi4b.walkerstreet.info kernel: BTRFS warning (device sda2): qgroup marked inconsistent, qgroup info item update error -2
Nov 07 01:12:51 rpi4b.walkerstreet.info kernel: BTRFS info (device sda2): qgroup scan completed (inconsistency flag cleared)
Nov 07 01:12:51 rpi4b.walkerstreet.info systemd-helper[320190]: Running timeline cleanup for 'root'.
Nov 07 01:12:51 rpi4b.walkerstreet.info systemd-helper[320190]: Running empty-pre-post cleanup for 'root'.
Nov 07 01:12:51 rpi4b.walkerstreet.info systemd-helper[320190]: Running 'btrfs qgroup clear-stale /.snapshots'.
Nov 07 01:12:51 rpi4b.walkerstreet.info systemd[1]: snapper-cleanup.service: Deactivated successfully.
Nov 07 01:13:52 rpi4b.walkerstreet.info systemd[1]: snapperd.service: Deactivated successfully.
Has anything changed on your system, or have you found a solution, since your last post about this issue?
It seems I’m facing the same issue on a system today. It just started two hours ago and the warning appears during the hourly cleanups, just like it does on your system.
I’d add that the system on which the issue started, contains a standard hard disk, not an SSD or nvme drive. I don’t know if this matters though.
I’m glad I’m not the only one… Nothing new, but I did send a note to linux-btrfs@vger.kernel.org; haven’t gotten a reply.
One thing that I do that probably isn’t very common is that I run the following script when I (occasionally/rarely) get an ENOSPC error on one of Tumbleweed’s periodic BTRFS maintenance processes:
I’m wondering if the balances aggravate something.
I did once try a repair with `btrfs check --repair /dev/sda2, thinking something may have corrupted that SSD, and I stopped seeing the warnings for a week or two. Unfortunately, the errors came back, and not long after they started on another machine (around them time I ran the script above), so if there was corruption, it’s not directly hardware related.
I hope this can get resolved soon. Right now, I’m crossing my fingers in hopes the warning is just a warning without serious consequence, but I may very well be over optimistic.
If anyone has ideas of how to gather useful information for debugging, let me know.
Booting from a USB installation drive into rescue mode and running btrfs check --repair /dev/drive_name seems to have solved the issue. It corrected 5 errors. I really wonder what caused those errors all of a sudden.
I also did a btrfs balance start / after the system started in normal mode again and I see no warning so far. Let’s hope it’s fixed.