I didn't notice this until it was nearly too late.  I had run out of
metadata space so I ran
 btrfs balance start -v -dusage=0 /mnt/btrfsroot

That went fine, but I was still low on metadata space, so I tried a
few variations:
 btrfs balance start -v -dusage=1 /mnt/btrfsroot
 btrfs balance start -v -dusage=5 /mnt/btrfsroot
 btrfs balance start -v -dusage=10 /mnt/btrfsroot

I didn't run any of these to completion, I cancelled them after a few hours.

I captured the output of a couple commands every once in a while:
 btrfs fi df /mnt/btrfsroot
 btrfs fi show /dev/sda5

What I didn't notice (because I was looking at the metadata space) was
the Data total size.

It starts out as:

Data, single: total=4.61TiB, used=2.50TiB
System, DUP: total=8.00MiB, used=576.00KiB
System, single: total=4.00MiB, used=0.00
Metadata, DUP: total=46.50GiB, used=42.82GiB
Metadata, single: total=8.00MiB, used=0.00
unknown, single: total=512.00MiB, used=0.00

Label: none  uuid: e6818780-7d28-41fe-b7a8-e38b61a98621
        Total devices 1 FS bytes used 2.54TiB
        devid    1 size 5.35TiB used 4.70TiB path /dev/sda5

Over time however, the Data total begins to drop:
Data, single: total=4.56TiB, used=2.50TiB
Data, single: total=4.41TiB, used=2.50TiB
Data, single: total=4.23TiB, used=2.51TiB
Data, single: total=4.00TiB, used=2.51TiB
Data, single: total=3.59TiB, used=2.51TiB
Data, single: total=3.35TiB, used=2.51TiB

The drop corresponds to a drop in the "show" used amounts:
        devid    1 size 5.35TiB used 4.65TiB path /dev/sda5
        devid    1 size 5.35TiB used 4.50TiB path /dev/sda5
        devid    1 size 5.35TiB used 4.32TiB path /dev/sda5
        devid    1 size 5.35TiB used 4.09TiB path /dev/sda5
        devid    1 size 5.35TiB used 3.68TiB path /dev/sda5
        devid    1 size 5.35TiB used 3.44TiB path /dev/sda5

System info:
Ubuntu 14.04
Linux server4 4.4.0-38-generic #57~14.04.1-Ubuntu SMP Tue Sep 6
17:20:43 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

I had been running the 14.04 btrfs-progs version 3.12-1ubuntu0.1

I just upgraded to btrfs-progs 4.4.1~ubuntu14.04.1~ppa1 from a PPA,
which allowed me to run
# btrfs fi usage /mnt/btrfsroot/
Overall:
    Device size:                   5.35TiB
    Device allocated:              3.44TiB
    Device unallocated:            1.91TiB
    Device missing:                  0.00B
    Used:                          2.59TiB
    Free (estimated):              2.75TiB      (min: 1.80TiB)
    Data ratio:                       1.00
    Metadata ratio:                   2.00
    Global reserve:              512.00MiB      (used: 0.00B)

Data,single: Size:3.35TiB, Used:2.51TiB
   /dev/sda5       3.35TiB

Metadata,DUP: Size:46.50GiB, Used:42.07GiB
   /dev/sda5      93.00GiB

System,DUP: Size:32.00MiB, Used:416.00KiB
   /dev/sda5      64.00MiB

Unallocated:
   /dev/sda5       1.91TiB

Any suggestions?
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to