From: Tomasz Chmielewski <mangoo@wpkg.org>
To: Andrei Borzenkov <arvidjaar@gmail.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: how to run balance successfully (No space left on device)?
Date: Mon, 18 Sep 2017 18:27:09 +0900 [thread overview]
Message-ID: <d4dce3d04c11e171b44a1924114f5ddd@wpkg.org> (raw)
In-Reply-To: <CAA91j0W5YNU-StfRY_M4YUC=aLY-W+VEZ+wP2XciiHmDB1q7gQ@mail.gmail.com>
On 2017-09-18 17:29, Andrei Borzenkov wrote:
> On Mon, Sep 18, 2017 at 11:20 AM, Tomasz Chmielewski <mangoo@wpkg.org>
> wrote:
>>>> # df -h /var/lib/lxd
>>>>
>>>> FWIW, standard (aka util-linux) df is effectively useless in a
>>>> situation
>>>> such as this, as it really doesn't give you the information you need
>>>> (it
>>>> can say you have lots of space available, but if btrfs has all of it
>>>> allocated into chunks, even if the chunks have space in them still,
>>>> there
>>>> can be problems).
>>
>>
>> I see here on RAID-1, "df -h" it shows pretty much the same amount of
>> free
>> space as "btrfs fi show":
>>
>> - "df -h" shows 105G free
>> - "btrfs fi show" says: Free (estimated): 104.28GiB
>> (min:
>> 104.28GiB)
>>
>
> I think both use the same algorithm to compute free space (df at the
> end just shows what kernel returns). The problem is that this
> algorithm itself is just approximation in general case. For uniform
> RAID1 profile it should be correct though.
And perhaps more important - can I assume that right now, with the
latest stable kernel (4.13.2 right now), running "btrfs balance" is not
safe and can lead to data corruption or loss?
Consider the following case:
- system admin runs btrfs balance on a filesystem with 100 GB free and
assumes it is enough space to complete successfully
- btrfs balance fails due to some bug with "No space left on device"
- at the same time, a database using this filesystem will fail with "No
space left on device", apt/rpm will fail a package upgrade, some program
using temp space will fail, log collector will fail to catch some data,
because of "No space left on device" and so on?
Tomasz Chmielewski
https://lxadm.com
next prev parent reply other threads:[~2017-09-18 9:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-17 15:02 how to run balance successfully (No space left on device)? Tomasz Chmielewski
2017-09-18 1:50 ` Duncan
2017-09-18 8:20 ` Tomasz Chmielewski
2017-09-18 8:29 ` Andrei Borzenkov
2017-09-18 9:27 ` Tomasz Chmielewski [this message]
2017-09-18 13:44 ` Peter Becker
2017-09-18 13:50 ` Tomasz Chmielewski
2017-09-19 2:59 ` Duncan
2017-10-31 14:18 ` Tomasz Chmielewski
2017-10-31 14:51 ` Tomasz Chmielewski
2017-11-07 5:13 ` Tomasz Chmielewski
[not found] ` <CAJtFHUQ34uyt-iAQKuQ-WqXMrCqxsPeqFc5LvYmZHrz+Rxs66A@mail.gmail.com>
2017-11-10 7:42 ` Tomasz Chmielewski
2017-11-10 21:51 ` Chris Murphy
2017-11-10 22:18 ` Martin Raiber
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=d4dce3d04c11e171b44a1924114f5ddd@wpkg.org \
--to=mangoo@wpkg.org \
--cc=arvidjaar@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.