* BTRFS warning (device sda7): block group 181491728384 has wrong amount of free space
@ 2017-05-02 6:14 Marat Khalili
2017-05-02 11:54 ` Duncan
0 siblings, 1 reply; 2+ messages in thread
From: Marat Khalili @ 2017-05-02 6:14 UTC (permalink / raw)
To: Linux fs Btrfs
Dear all,
I cannot understand two messages in syslog, could someone please shed
some light? Here they are:
> Apr 29 08:54:03 container-name kernel: [792742.662375] BTRFS warning
> (device sda7): block group 181491728384 has wrong amount of free space
> Apr 29 08:54:03 container-name kernel: [792742.662381] BTRFS warning
> (device sda7): failed to load free space cache for block group
> 181491728384, rebuilding it now
Especially strange is the fact that messages appear in LXC container's
syslog, but not in syslog of a host system. I only saw network and
apparmor-related messages in container syslogs before.
I didn't run any usermode btrfs tools at the time (especially in
container, since they are not even installed there), but there's a quota
set for this subvolume, and it was coming close to exhausting by large
mysql database. There're no snapshots this time. smartmon finds no problems.
> marat@host:~$ uname -a
> Linux host 4.4.0-72-generic #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC
> 2017 x86_64 x86_64 x86_64 GNU/Linux
> marat@host:~$ lsb_release -a
> No LSB modules are available.
> Distributor ID: Ubuntu
> Description: Ubuntu 16.04.2 LTS
> Release: 16.04
> Codename: xenial
> marat@host:~$ btrfs --version
> btrfs-progs v4.4
> marat@host:~$ sudo btrfs qgroup show -F -pcre
> /mnt/lxc/container-name/rootfs
> qgroupid rfer excl max_rfer max_excl parent child
> -------- ---- ---- -------- -------- ------ -----
> 0/802 63.93GiB 63.93GiB 64.00GiB none --- ---
> marat@host:~$ sudo btrfs filesystem show /dev/sda7 # run after freeing
> space by clearing database
> Label: 'data' uuid: 37d3313a-e2ad-4b7f-98fc-a01d815952e0
> Total devices 2 FS bytes used 47.73GiB
> devid 1 size 2.71TiB used 114.01GiB path /dev/sda7
> devid 2 size 2.71TiB used 114.01GiB path /dev/sdb7
> marat@host:~$ sudo btrfs filesystem df /mnt/lxc/container-name/rootfs#
> run after freeing space by clearing database
> Data, RAID1: total=111.00GiB, used=46.83GiB
> System, RAID1: total=8.00MiB, used=32.00KiB
> Metadata, RAID1: total=3.00GiB, used=983.11MiB
> GlobalReserve, single: total=336.00MiB, used=0.00B
> marat@host:~$ sudo lxc-attach -n container-name cat /proc/mounts |
> grep sda7
> /dev/sda7 / btrfs
> rw,relatime,space_cache,subvolid=802,subvol=/lxc/container-name/rootfs 0 0
--
With Best Regards,
Marat Khalili
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: BTRFS warning (device sda7): block group 181491728384 has wrong amount of free space
2017-05-02 6:14 BTRFS warning (device sda7): block group 181491728384 has wrong amount of free space Marat Khalili
@ 2017-05-02 11:54 ` Duncan
0 siblings, 0 replies; 2+ messages in thread
From: Duncan @ 2017-05-02 11:54 UTC (permalink / raw)
To: linux-btrfs
Marat Khalili posted on Tue, 02 May 2017 09:14:12 +0300 as excerpted:
> I cannot understand two messages in syslog, could someone please shed
> some light? Here they are:
>
>> Apr 29 08:54:03 container-name kernel: [792742.662375] BTRFS warning
>> (device sda7): block group 181491728384 has wrong amount of free space
>> Apr 29 08:54:03 container-name kernel: [792742.662381] BTRFS warning
>> (device sda7): failed to load free space cache for block group
>> 181491728384, rebuilding it now
> Especially strange is the fact that messages appear in LXC container's
> syslog, but not in syslog of a host system. I only saw network and
> apparmor-related messages in container syslogs before.
>
> I didn't run any usermode btrfs tools at the time (especially in
> container, since they are not even installed there), but there's a quota
> set for this subvolume, and it was coming close to exhausting by large
> mysql database. There're no snapshots this time. smartmon finds no
> problems.
These aren't anything to be alarmed about in themselves; they're just low
priority warnings from the free-space *cache*, saying it somehow got out
of sync with what's actually there. As that's just a cache, designed to
help speed up looking for free space without having to actually go and
check every time, and problems will be caught and that block-group's
cache invalidated and recreated (with those messages indicating that's
exactly what's happening) if btrfs finds there's actually data written in
a block that the cache said was free, no harm done.
Inconsistencies are typically generated in an unclean unmount situation,
but may not be caught until sometime later, when btrfs goes to actually
use some space the cache says should be available, that actually isn't.
AFAIK (I'm a btrfs user and list regular, not a dev), it shouldn't have
anything to do with quota.
I wouldn't worry about it myself, particularly if I hadn't been able to
do a clean unmount at some point, tho if I saw the warning, I'd probably
do a btrfs scrub just to be sure that warning wasn't hinting at some more
real problem somewhere.
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-02 11:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-02 6:14 BTRFS warning (device sda7): block group 181491728384 has wrong amount of free space Marat Khalili
2017-05-02 11:54 ` Duncan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.