Bug 72801 - btrfs balance start -v -dusage=0 fails (btrfs-tools 3.12)
Summary: btrfs balance start -v -dusage=0 fails (btrfs-tools 3.12)
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: btrfs (show other bugs)
Hardware: All Linux
: P1 high
Assignee: Josef Bacik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-23 19:09 UTC by Marc MERLIN
Modified: 2016-03-20 11:32 UTC (History)
3 users (show)

See Also:
Kernel Version: 3.14
Tree: Mainline
Regression: No


Attachments

Description Marc MERLIN 2014-03-23 19:09:51 UTC
legolas:/mnt/btrfs_pool2# btrfs balance start -v -dusage=5 /mnt/btrfs_pool2
Dumping filters: flags 0x1, state 0x0, force is off
  DATA (flags 0x2): balancing, usage=5
ERROR: error during balancing '/mnt/btrfs_pool2' - No space left on device
There may be more info in syslog - try dmesg | tail
legolas:/mnt/btrfs_pool2# btrfs balance start -v -dusage=0 /mnt/btrfs_pool2
Dumping filters: flags 0x1, state 0x0, force is off
  DATA (flags 0x2): balancing, usage=0
ERROR: error during balancing '/mnt/btrfs_pool2' - No space left on device

legolas:/mnt/btrfs_pool2# btrfs fi df .
Data, single: total=800.42GiB, used=636.91GiB
System, DUP: total=8.00MiB, used=92.00KiB
System, single: total=4.00MiB, used=0.00
Metadata, DUP: total=10.00GiB, used=9.50GiB
Metadata, single: total=8.00MiB, used=0.00

Hugo requested a filesystem image
https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg32415.html

I cannot upload the image on bugzilla, it keeps timing out. I'll upload to my web server and provide a link when it's done.
Comment 1 Marc MERLIN 2014-03-23 21:19:45 UTC
Ok, the image is there: http://marc.merlins.org/tmp/pool2.image
Please let me know when you've retreived/analysed it and I'll remove it.
Comment 2 David Sterba 2014-03-24 11:03:38 UTC
I've seen something similar, usage=0 filter failed with ENOSPC when Metadata were almost full (but within margin of 512M). I think this should succeed because there's no 1G-chunk shifting and removing completely empty chunks changes only a few kb of metadata structures.

The 512M space diff is probably the global block reserve that cannot be normally used during balance, but possibly could in this special case.

Note You need to log in before you can comment on or make changes to this bug.