From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: ENOSPC errors during raid1 rebalance
Date: Thu, 6 Mar 2014 07:41:01 +0000 (UTC) [thread overview]
Message-ID: <pan$23ceb$3bedfe62$bfb976de$e16d8fde@cox.net> (raw)
In-Reply-To: loom.20140305T190503-404@post.gmane.org
Michael Russo posted on Wed, 05 Mar 2014 22:13:10 +0000 as excerpted:
> Chris Murphy <lists <at> colorremedies.com> writes:
>
>> You could also try a full defragment by specifying -r on the mount
>> point with a small -t value to effectively cause everything to be
>> subject to defragmenting. If this still doesn't permit soft rebalance,
>> then maybe filefrag can find files that have more than 1 extent and
>> just copy them (make duplicates, delete the original). Any copy will be
>> allocated into chunks with the new profile.
>
> I would think so too. But it doesn't seem to be happening.
> Here is an example with one file:
>
> root@ossy:/mymedia# filefrag output.wav output.wav: 2 extents found
> root@ossy:/mymedia# /usr/src/btrfs-progs/btrfs fi de -t 1
> /mymedia/output.wav root@ossy:/mymedia# filefrag output.wav output.wav:
> 2 extents found
>
> btrfs does not defrag the file. And copying the file usually doesn't
> defrag it either:
>
> root@ossy:/mymedia# cp output.wav output.wav.bak root@ossy:/mymedia#
> filefrag output.wav.bak output.wav.bak: 2 extents found
>
> I even tried copying a large file to another filesystem (/dev/shm),
> removing the original, and copying it back, and more often than not
> it still had more than 1 extent.
This was covered in one thread recently, but looking back in this one I
didn't find it covered here, so...
What are your mount options? Do they include compress and/or compress-
force? Because filefrag doesn't understand btrfs compression yet and
counts each 128 KiB (I believe) compression block as a separate extent.
I'm not sure whether that's 128 KiB pre-compression or post-compression
size, and I'm not even positive it's 128 KiB, but certainly, if the file
is large enough and btrfs is compressing it, filefrag will false-positive
report multiple extents. That's a known issue with it ATM.
Meanwhile, there's ongoing work to teach filefrag about btrfs compression
so it can report fragmentation accurately, but from what I've read
they're working on a general kernel-VFS-level API for that so the same
general API can be used by other filesystems, and getting proper
agreement on that API, and having both the kernel and filefrag implement
it isn't a simple single-kernel-cycle project. There's a lot of
filesystems other than btrfs that could potentially use this sort of
thing, and getting a solution that will work well for all of them is hard
work, both technically and politically. But once it's implemented, /
correctly/, the entire Linux kernel filesystem space will benefit, just
as btrfs is getting the benefit of the filefrag tool that ships with
e2fsprogs, and the filesystem testing that ships as xfstests. =:^)
But if you're not using compression, /that/ can't explain it...
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
next prev parent reply other threads:[~2014-03-06 7:41 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-03 17:23 ENOSPC errors during raid1 rebalance Mike Russo
2014-03-03 18:16 ` Duncan
2014-03-03 18:24 ` Michael Russo
2014-03-03 18:48 ` Chris Murphy
2014-03-03 19:24 ` Michael Russo
2014-03-03 20:41 ` Chris Murphy
2014-03-03 20:50 ` Michael Russo
2014-03-03 21:02 ` Chris Murphy
2014-03-03 18:39 ` Hugo Mills
2014-03-04 15:55 ` Michael Russo
2014-03-04 17:29 ` Chris Murphy
2014-03-04 18:54 ` Michael Russo
2014-03-04 19:30 ` Chris Murphy
2014-03-05 0:27 ` Mike Russo
2014-03-05 3:32 ` Chris Murphy
2014-03-05 22:13 ` Michael Russo
2014-03-06 7:41 ` Duncan [this message]
2014-03-07 1:13 ` Michael Russo
2014-03-07 8:02 ` Hugo Mills
2014-03-07 10:18 ` Duncan
2014-03-07 14:17 ` Mike Russo
2014-03-08 1:46 ` Mike Russo
2014-03-05 4:08 ` Chris Murphy
2014-03-05 22:13 ` Michael Russo
2014-03-06 17:07 ` Chris Murphy
-- strict thread matches above, loose matches on Subject: below --
2014-03-13 22:38 Eugene Crosser
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='pan$23ceb$3bedfe62$bfb976de$e16d8fde@cox.net' \
--to=1i5t5.duncan@cox.net \
--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