I've got an issue with btrfs free space (not that uncommon), but I was unable to solve it by following most obvious sources. I don't know what I'm missing.

Sources: https://btrfs.wiki.kernel.org/index.php/FAQ#Help.21_I_ran_out_of_disk_space.21 http://marc.merlins.org/perso/btrfs/post_2014-05-04_Fixing-Btrfs-Filesystem-Full-Problems.html

My system:

# uname -a
Linux archb3 4.6.3-2-ARCH #1 PREEMPT Wed Jun 29 07:15:33 MDT 2016 armv5tel GNU/Linux

/home is automounted (no entry in fstab)
/home/storage/video     /home/cata/files none          bind            0 0

# mount | grep btrfs
/dev/sda4 on /home type btrfs (rw,relatime,space_cache,subvolid=5,subvol=/)
/dev/sda4 on /home/cata/files type btrfs (rw,relatime,space_cache,subvolid=5,subvol=/storage/video)

# btrfs fi df /home
Data, single: total=1.64TiB, used=1.60TiB
System, DUP: total=8.00MiB, used=224.00KiB
Metadata, DUP: total=4.00GiB, used=2.16GiB
GlobalReserve, single: total=512.00MiB, used=0.00B

# btrfs fi show /dev/sda4
Label: 'home'  uuid: 1c7e35e8-f013-4f65-9d19-eaa168ac088b
    Total devices 1 FS bytes used 1.61TiB
    devid    1 size 1.81TiB used 1.65TiB path /dev/sda4

# btrfs fi usage /home
    Device size:                   1.81TiB
    Device allocated:              1.65TiB
    Device unallocated:          168.93GiB
    Device missing:                  0.00B
    Used:                          1.61TiB
    Free (estimated):            203.23GiB      (min: 118.76GiB)
    Data ratio:                       1.00
    Metadata ratio:                   2.00
    Global reserve:              512.00MiB      (used: 0.00B)

Data,single: Size:1.64TiB, Used:1.60TiB
   /dev/sda4       1.64TiB

Metadata,DUP: Size:4.00GiB, Used:2.16GiB
   /dev/sda4       8.00GiB

System,DUP: Size:8.00MiB, Used:224.00KiB
   /dev/sda4      16.00MiB

   /dev/sda4     168.93GiB

If I get it correctly, there should be no issue with Metadata (over 40% free), and I can't see how there's an issue with Data - 1.64 TiB allocated out of 1.81 TiB available.

I tried to run rebalancing, but it bails out with "no space left of device" message - I remove a directory with ~25 GiB of data, but to no avail.

What am I missing?

EDIT: There are no snapshots on the system, just checked.

EDIT2: I deleted about 50 GB of data and ran defrag - to my amazement, the disk reports now: # btrfs fi df /home Data, single: total=1.71TiB, used=1.70TiB System, DUP: total=8.00MiB, used=224.00KiB Metadata, DUP: total=3.50GiB, used=2.24GiB GlobalReserve, single: total=512.00MiB, used=0.00B

So it's like after removing 50 GB, another 100 GB appeared on the drive.

I want to like btrfs, but it seems utterly unpredictable :/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.