All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hugo Mills <hugo@carfax.org.uk>
To: Jakob Truelsen <antialize@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: No space left on device
Date: Wed, 12 Feb 2014 10:26:13 +0000	[thread overview]
Message-ID: <20140212102613.GN6490@carfax.org.uk> (raw)
In-Reply-To: <CAEhsiNw3hLSu8zPw44ndR1xQ-fjFrzaSCw3GDa=1vhCY3BypnA@mail.gmail.com>

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

On Wed, Feb 12, 2014 at 10:51:12AM +0100, Jakob Truelsen wrote:
> Hello. I am experiencing "No space left on device" with a btrfs file
> system, yet I cannot seem to find any exhausted resource. Could some
> resource I do not know about be exhausted, or is this caused by
> something else. Below is a trace of information that might be usefull,
> please let me know if there is anything I can do to resolve the issue.
> 
> /Jakob
> 
> [jakobt@soda ~]$ uname -a
> Linux soda 3.12.8-1-ARCH #1 SMP PREEMPT Thu Jan 16 09:16:34 CET 2014
> x86_64 GNU/Linux

   Were you using this kernel when the problem happened?

> [jakobt@soda ~]$ btrfs --version
> Btrfs v3.12
> 
> [jakobt@soda ~]$ mount
> ...
> /dev/sda on /data type btrfs (rw,relatime,nospace_cache)
> 
> [jakobt@soda ~]$ df /data
> Filesystem     1K-blocks     Used Available Use% Mounted on
> /dev/sdb2       76594224 49247368  23433028  68% /
> 
> [jakobt@soda ~]$ btrfs filesystem df /data
> Data, single: total=1.82TiB, used=518.04GiB
> System, DUP: total=8.00MiB, used=204.00KiB
> System, single: total=4.00MiB, used=0.00
> Metadata, DUP: total=1.00GiB, used=767.70MiB

   ^^^ This is your problem, most likely in conjunction with all the
space on the device being allocated. Being a copy-on-write filesystem,
btrfs needs free space to make any update. If it doesn't have that
free space, you get "No space left on device". You typically need
somewhere around 0.5-1 GiB of headroom in metadata for normal
operation, so I'm surprised you got this far. :)

   The FS should normally allocate more metadata space as it needs it,
but because (I think) your data allocation has taken up all the
available space on the device, there's no way for it to add more.

> Metadata, single: total=8.00MiB, used=0.00

> [jakobt@soda ~]$ touch /data/jakobt/hat
> touch: cannot touch ‘/data/jakobt/hat’: No space left on device
> 
> [jakobt@soda ~]$ sudo btrfs fi balance start /data
> ERROR: error during balancing '/data' - No space left on device
> There may be more info in syslog - try dmesg | tail

   Try:

btrfs balance start -dusage=0 /data

which should go looking for entirely unused block groups and reclaim
those. (If you don't use the -dusage= parameter, it will try to
balance everything, which takes a long time).

> [jakobt@soda ~]$ dmesg | grep tail -n 2
> [1113177.878157] btrfs: device label Data devid 1 transid 44784 /dev/sda
> [1113507.641752] btrfs: 1866 enospc errors during balance

   Although, that said... it looks like it's tried every block group
and failed with each one, so my suggestion above may not work in this
instance.

   Let us know what happens with the balance command above anyway
(dmesg output is useful information at this point). If that doesn't
help, then we'll probably need to take a metadata image and throw it
in josef's direction, where he will start crying at having to deal
with enospc problems again. :)

   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
         --- If you're not part of the solution, you're part ---         
                           of the precipiate.                            

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

  reply	other threads:[~2014-02-12 10:26 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12  9:51 No space left on device Jakob Truelsen
2014-02-12 10:26 ` Hugo Mills [this message]
2014-02-12 10:45   ` Jakob Truelsen
2014-02-12 11:07     ` Hugo Mills
2014-02-12 10:34 ` Leonidas Spyropoulos
  -- strict thread matches above, loose matches on Subject: below --
2012-11-01 13:35 no " Kenneth Johansson
2012-11-02 15:54 ` Kyle Gates
2012-11-02 15:59   ` Hugo Mills
2012-11-06 13:23   ` Kenneth Johansson
2012-08-03 10:05 Mark Marshall
2012-08-04  9:14 ` Chris Samuel
2012-08-04  9:26 ` Martin Steigerwald
2012-06-19 12:05 No " André Øien Langvand
2012-06-19 12:36 ` Geoffrey Wehrman
2012-06-20  6:07   ` Dave Chinner
2012-06-20 15:30     ` André Øien Langvand
     [not found] <AANLkTinH225vC8fRbA7zk_iOEmyADFZMBS6b7gx1tOxm@mail.gmail.com>
2011-02-08  9:00 ` no " Leonidas Spyropoulos
2011-02-08  9:31   ` cwillu
2011-02-08 10:08     ` Leonidas Spyropoulos
2011-02-08 13:19       ` Helmut Hullen
2011-02-08 18:56         ` Erik Logtenberg
2011-02-08 19:43           ` Helmut Hullen
2011-02-12 14:11             ` Erik Logtenberg
2011-02-08 20:36           ` Helmut Hullen
2011-02-07 21:21 Leonidas Spyropoulos
2011-02-07 21:27 ` Erik Logtenberg
2011-02-07 23:58   ` Robert G.
2011-02-08  0:09 ` C Anthony Risinger
2010-09-24 14:07 No " Turbo Fredriksson
2010-09-24 15:23 ` Geoffrey Wehrman
     [not found]   ` <2D51C7BA-FE51-48AF-9839-1A6AD2171510@bayour.com>
     [not found]     ` <20100927160643.GA10594@sgi.com>
     [not found]       ` <D3DB5B56-D15C-408C-B2B4-58626C23D798@bayour.com>
2010-10-04  6:40         ` Turbo Fredriksson
2010-09-25  2:18 ` Dave Chinner
2010-07-30  5:31 no " Lubos Kolouch
     [not found] ` <AANLkTikBRfR45DZxZW9LM6wnREWrbysPCr9Z1d3YuYhC@mail.gmail.com>
2010-07-30 12:27   ` Lubos Kolouch
     [not found]     ` <AANLkTinBj1O-LapAeBCT2Y3A1ZhfFZ3AotCk6SZ-e-2U@mail.gmail.com>
2010-07-30 14:30       ` Leonidas Spyropoulos
2010-07-30 15:02         ` Lubos Kolouch
2010-07-30 15:09           ` Lubos Kolouch
2010-08-14 20:15             ` Lubos Kolouch
2008-12-08  9:46 No " Gabor MICSKO
2008-12-08 14:02 ` dcg
2002-03-19 17:27 Sebastian
2002-03-20 17:27 ` David Woodhouse
2002-03-27 18:49   ` Sebastian
2002-03-27 19:13   ` David Woodhouse
2002-03-27 19:58     ` Sebastian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140212102613.GN6490@carfax.org.uk \
    --to=hugo@carfax.org.uk \
    --cc=antialize@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.