From: Hugo Mills <hugo@carfax.org.uk>
To: linux-btrfs@vger.kernel.org
Subject: Re: btrfs balance on single device
Date: Wed, 18 Dec 2013 11:05:29 +0000 [thread overview]
Message-ID: <20131218110528.GK11281@carfax.org.uk> (raw)
In-Reply-To: <20131218104442.GA28559@pdb1.th.formicary.net>
[-- Attachment #1: Type: text/plain, Size: 3136 bytes --]
On Wed, Dec 18, 2013 at 10:44:43AM +0000, Leonidas Spyropoulos wrote:
> I'm using the same subject as it might be relevant, feel free to change it.#
>
> I'm trying to do some maintenance to the system running over a btrfs file system on root (/). I started a balance on the '/' partition and it failed with the below information:
> $ sudo btrfs balance start /
> [sudo] password for inglor:
> ERROR: error during balancing '/' - No space left on device
> There may be more info in syslog - try dmesg | tail
> $ dmesg | tail
> [93827.115887] btrfs: found 29461 extents
> [93827.481849] btrfs: relocating block group 29855055872 flags 1
> [93841.646011] btrfs: found 33171 extents
> [93851.421207] btrfs: found 33171 extents
> [93851.782054] btrfs: relocating block group 28781314048 flags 1
> [93866.815342] btrfs: found 52535 extents
> [93877.159354] btrfs: found 52534 extents
> [93877.356805] btrfs: relocating block group 28747759616 flags 34
> [93880.287185] btrfs: found 1 extents
> [93880.608798] btrfs: 1 enospc errors during balance
You don't specify your kernel version, but if it's older than 3.11
or so, you should probably upgrade -- 3.10 and earlier had occasional
bugs where the block reserve system never kept enough blocks free to
add a new metadata chunk when it was needed, which led to exactly this
kind of symptom.
Alternatively, and this is a bit of a long shot given that the
error seems to have been while relocating your system chunk (which
argues against this particular diagnosis), but:
Do you have a large file on that filesystem (larger than 1 GiB)?
If so, I would recommend switching to a 3.12 kernel, and running a
defrag on the file. There's a known and now-fixed bug where you can
get ENOSPC while balancing, if a file has an extent larger than 1 GiB
in size. (The bug being that there's an extent over 1 GiB in size in
the first place).
Hugo.
> $ df |grep sda2
> /dev/sda2 20971520 13980396 5797124 71% /
>
>
> $ sudo btrfs fi show
> [sudo] password for inglor:
> Label: none uuid: 699d671b-7064-441d-95ec-c616049fe287
> Total devices 1 FS bytes used 12.75GB
> devid 1 size 20.00GB used 15.31GB path /dev/sda2
>
> Btrfs v0.20-rc1-358-g194aa4a-dirty
>
> $ sudo btrfs fi df /
> [sudo] password for inglor:
> Data: total=13.00GB, used=12.16GB
> System, DUP: total=32.00MB, used=4.00KB
> Metadata, DUP: total=1.12GB, used=601.54MB
>
> Does it really needs more than 5.7GB to do a balance? I though it suppose to move chunks one by one and considering the chunks for Data is 1GB and for MetaData 512MB (256 x2 for dublication) it should be more than enough.
> Also I had less space before and the dmesg reported 7 enospc errors. With cleaning a bit of packages installed now it reports only 1 enospc. Is that anywhere relevant?
>
> Thanks,
> Leonidas
--
=== 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
--- I'd make a joke about UDP, but I don't know if ---
anyone's actually listening...
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2013-12-18 11:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-15 20:20 btrfs balance on single device Leonidas Spyropoulos
2013-12-15 20:24 ` Hugo Mills
2013-12-15 20:28 ` Leonidas Spyropoulos
2013-12-15 23:28 ` Duncan
2013-12-16 23:22 ` Leonidas Spyropoulos
2013-12-17 5:02 ` Duncan
[not found] ` <CAAeznTpZ6p1_ZR6xy-YGynAJu88jZ_52AQURuxT4qTeEYLOjdg@mail.gmail.com>
2013-12-18 10:44 ` Leonidas Spyropoulos
2013-12-18 11:05 ` Hugo Mills [this message]
2013-12-18 11:29 ` Leonidas Spyropoulos
2013-12-19 8:14 ` Leonidas Spyropoulos
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=20131218110528.GK11281@carfax.org.uk \
--to=hugo@carfax.org.uk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).