Re: ERROR: error during balancing '.' - No space left on device

Hugo Mills
2014-03-23T16:28:28Z

[-- Attachment #1: Type: text/plain, Size: 3060 bytes --]

On Sun, Mar 23, 2014 at 09:20:00AM -0700, Marc MERLIN wrote:
> Both
> legolas:/mnt/btrfs_pool2# btrfs balance start -v -dusage=5 /mnt/btrfs_pool2
> legolas:/mnt/btrfs_pool2# btrfs balance start -v -dusage=0 /mnt/btrfs_pool2
> failed unfortunately.
>
> On Sun, Mar 23, 2014 at 12:26:32PM +0000, Duncan wrote:
> > When it rains, it pours. What you're missing is that this is now the
> > third thread in three days with exactly the same out-of-space-when-there-
> > appears-to-be-plenty problem, which is well explained and a solution
> > presented, along with further discussion, on those threads.
> >
> > Evidently you haven't read the others, but rather than rewrite a similar
> > reply here with exactly the same explanation and fix, I'll just refer you
> > to them.
>
> Thanks. Indeed, while I spent most of yesterday dealing with 3 btrfs
> filesystems, the one here that was hanging my laptop, the raid5 one that
> was hanging repeatedly during balance, and then my main server were one
> FS is so slow that it takes 8H to do an reflink copy or delete a backup
> with 1 million inodes, I got behind on reading the list :)
>
> Thanks for the pointers
>
> > btrfs balance start -dusage=5 `pwd`
> >
> > Tweak the N in usage=N as needed.
>
> I had actually tried this, but it failed too:
> 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
>
> But I now just found
> https://btrfs.wiki.kernel.org/index.php/Balance_Filters
> and tried -dusage=0
>
> On Sun, Mar 23, 2014 at 11:47:12AM +0000, Hugo Mills wrote:
> > I think you probably shouldn't be doing a full balance, but a
> > filtered one:
> >
> > # btrfs balance start -dusage=5 /mnt/btrfs_pool
> >
> > which should only try to clean up chunks which have little usage (so
> > it's much faster to run).
>
> Thanks for the other answer Hugo.
>
> So, now I'm down to
> 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
>
> Looks like there is no good way out of this, so I'll start deleting
> snapshots.

Before you do this, can you take a btrfs-image of your metadata,
and add a report to bugzilla.kernel.org? You're not the only person
who's had this problem recently, and I suspect there's something
still lurking in there that needs attention.

> Hopefully this will be handled better in later code.

With the info you can provide from a btrfs-image... let's hope so. :)

Hugo.

--
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
--- Anyone using a computer to generate random numbers is, of ---
course, in a state of sin.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]