On Thu, Apr 10, 2014 at 01:00:35PM -0700, Chip Turner wrote:
> I have a filesystem that I can't seem to resolve ENOSPC issues.  No
> write operation can succeed; I've tried the wiki's suggestions
> (balancing, which fails because of ENOSPC, mounting with nodatacow,
> clear_cache, nospace_cache, enospc_debug, truncating files, deleting
> files, briefly microwaving the drive, etc).
> 
> btrfs show:
> Label: none  uuid: 04283a32-b388-480b-9949-686675fad7df
> Total devices 1 FS bytes used 135.58GiB
> devid    1 size 238.22GiB used 238.22GiB path /dev/sdb2
> 
> btrfs fi df:
> Data, single: total=234.21GiB, used=131.82GiB
> System, single: total=4.00MiB, used=48.00KiB
> Metadata, single: total=4.01GiB, used=3.76GiB

   I'm surprised it's managed to use that much of the metadata
allocation. The FS usually hits this problem with a much smaller
used-to-total ratio.

> So, the filesystem is pretty much unusable, and I can find no way to
> resuscitate it.  I ended up in this state by creating a snapshot of
> the root of the fs into a read/write subvolume, which I wanted to
> become my new root, then began deleting entries in the filesystem
> itself outside of the new snapshot.  So nothing particularly weird or
> crazy.  The only oddness is the file count -- I have a *lot* of
> hardlinked files (this is an rsnapshot volume, so it has a large
> number of files and many of them are hard linked).
> 
> It seems like the normal solution is btrfs balance, but that fails.
> defragment also fails.  Kernel is 3.13.
> 
> Is there anything else I can or should do, or just wipe it and
> recreate with perhaps better initial defaults?  If this kind of thing
> is unavoidable, how might I have anticipated it and prevented it?
> Fortunately this was a migration effort and so my original data is
> safe inside of ext4 (ew).

   One thing you could do is btrfs dev add a small new device to the
filesystem (say, a USB stick, or a 4 GiB loopback file mounted over
NBD or something). Then run the filtered balance. Then btrfs dev del
the spare device.

   The fact that this FS has ended up in this state should be
considered a bug. It used to be quite common, then josef fixed a load
of problems, and it's been rare for about a year. Only recently we've
been seeing more of this kind of problem, and I think there's been a
bit of a regression somewhere.

   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
            --- "Can I offer you anything? Tea? Seedcake? ---            
                         Glass of Amontillado?"                          

Attachment: signature.asc
Description: Digital signature

Reply via email to