2019-12-11 18:17:44

by Toralf Förster

[permalink] [raw]
Subject: BTRFS with kernel 5.4.1: df -h shows 0 Bytes available but btrfs tells me that there are 1.06 TiB free

Since 5.4 (5.3.xy was fine) I do get every few days:

# df -h /home/tinderbox/img1
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 1.7T 614G 0 100% /home/tinderbox/img1


# btrfs filesystem usage /home/tinderbox/img1
Overall:
Device size: 1.66TiB
Device allocated: 614.02GiB
Device unallocated: 1.06TiB
Device missing: 0.00B
Used: 613.38GiB
Free (estimated): 1.06TiB (min: 543.50GiB)
Data ratio: 1.00
Metadata ratio: 2.00
Global reserve: 512.00MiB (used: 0.00B)

Data,RAID0: Size:566.00GiB, Used:565.50GiB (99.91%)
/dev/sda5 283.00GiB
/dev/sdb1 283.00GiB

Metadata,RAID1: Size:24.00GiB, Used:23.94GiB (99.76%)
/dev/sda5 24.00GiB
/dev/sdb1 24.00GiB

System,RAID1: Size:8.00MiB, Used:64.00KiB (0.78%)
/dev/sda5 8.00MiB
/dev/sdb1 8.00MiB

Unallocated:
/dev/sda5 542.99GiB
/dev/sdb1 542.99GiB


This is a hardened Gentoo linux acting as a QA build bot for their packages:

# uname -a
Linux mr-fox 5.4.2 #2 SMP Thu Dec 5 01:18:19 CET 2019 x86_64 Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz GenuineIntel GNU/Linux


I do appreciate hints to overcome this situation.

--
Toralf


2019-12-11 18:59:46

by Chris Murphy

[permalink] [raw]
Subject: Re: BTRFS with kernel 5.4.1: df -h shows 0 Bytes available but btrfs tells me that there are 1.06 TiB free

Hi,

Yes this is being discussed in two other threads:

"df shows no available space in 5.4.1"
"100% disk usage reported by "df", 60% disk usage reported by "btrfs
fi usage" - this breaks userspace behaviour"

Seems pretty clear there is a bug, it just needs to be located and fixed.

--
Chris Murphy

2019-12-31 16:17:05

by Toralf Förster

[permalink] [raw]
Subject: Re: BTRFS with kernel 5.4.1: df -h shows 0 Bytes available but btrfs tells me that there are 1.06 TiB free

On 12/11/19 7:58 PM, Chris Murphy wrote:
> Hi,
>
> Yes this is being discussed in two other threads:
>
> "df shows no available space in 5.4.1"
> "100% disk usage reported by "df", 60% disk usage reported by "btrfs
> fi usage" - this breaks userspace behaviour"
>
> Seems pretty clear there is a bug, it just needs to be located and fixed.
>
> --
> Chris Murphy
>

I checked the git log of the stable kernel v5.4..v5.4.7 but it seems this issue is not yet addressed in the stable tree, or?

--
Toralf