From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: Confusing output of btrfs fi df
Date: Sun, 27 Apr 2014 01:21:30 +0000 (UTC) [thread overview]
Message-ID: <pan$f399b$352875cd$836588d2$a41de4b4@cox.net> (raw)
In-Reply-To: A666D949-AB49-4A9B-9BD8-2D1206F5CCB0@colorremedies.com
Chris Murphy posted on Sat, 26 Apr 2014 15:28:03 -0600 as excerpted:
>>> btrfs balance start -dprofiles=single -mprofiles=single
>>> -sprofiles=single /mountpoint
>
>> After that btrfs fi df shows the following:
>>
>> Data, RAID1: total=2.64TiB, used=2.22TiB
>> System, RAID1: total=8.00MiB, used=380.00KiB
>> > System, single: total=4.00MiB, used=0.00 <
>> Metadata, RAID1: total=4.00GiB, used=2.94GiB
>
> Hmm, seems like a bug. What about
>
> btrfs balance start -sconvert=raid1,soft -f -v
... Or simply...
btrfs balance start -susage=0 -f -v
In theory, metadata includes system, so system shouldn't need to be done
on its own. If system IS explicitly listed, however, force must be used
as well, as you found out.
The convert=raid1 should convert all named types to raid1, while the soft
keeps it from redoing all chunks that are already in target mode.
usage=N says only do the chunks with usage at or below N%, and
profile=single says only do those in single profile.
So since the system chunk in question is single mode, balance start -
sprofile=single -f /should/ have converted it, but didn't. My guess is
that for some reason it didn't realize that you actually wanted system
converted and what to, since you only gave it the existing profile, not
the target profile. For metadata it did the right thing anyway, but
apparently not for system.
But given the above, there's multiple ways to skin that cat. The
-sconvert=raid1,soft -f /should/ do it as well, and I expect it will,
since that actually tells it the target format.
But if for some reason that doesn't work either, I /know/ the -susage=0
-f should do it, since usage=0 is the one I've always used to do it here.
If you did -musage=0, that should actually include both metadata and
system, and doesn't need -f. I've found that to be the case here too.
But the -m might find a few additional non-system metadata blocks to free
in the process, which wouldn't be a bad thing but could take a bit more
time. (Tho at 0 usage it shouldn't take much! =:^)
Actually, given your metadata total of 4 GiB, nearly 3 GiB used, it's
quite possible that would end up returning a couple chunks, giving you
3.5 GiB total, still nearly 3 GiB used. Tho it depends on whether
there's actually free metadata chunks or not, since the usage=0 says
don't bother if they aren't totally empty. (It normally wouldn't free
all the way down to 3 GiB metadata total, however, since the filesystem
reserves a couple hundred MiB for its own use, metadata chunks are 256 MiB
each, and they're raid1, so they're allocated in pairs. Thus, even a
full balance would probably leave you at 3.5 GiB total metadata, still
just under 3 GiB used.)
--
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-04-27 1:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-26 14:09 Confusing output of btrfs fi df Stefan Malte Schumacher
2014-04-26 14:30 ` Hugo Mills
2014-04-26 18:18 ` Stefan Malte Schumacher
2014-04-26 21:28 ` Chris Murphy
2014-04-27 1:21 ` Duncan [this message]
2014-04-28 12:55 ` Dan van der Ster
-- strict thread matches above, loose matches on Subject: below --
2014-04-27 15:37 Stefan Malte Schumacher
2014-04-28 1:48 ` Duncan
2014-04-28 11:57 Stefan Malte Schumacher
2014-04-28 12:06 ` Hugo Mills
2014-04-29 1:28 Stefan Malte Schumacher
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$f399b$352875cd$836588d2$a41de4b4@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 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.