From: Marc MERLIN <marc@merlins.org>
To: Remi Gauvin <remi@georgianit.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: Have 15GB missing in btrfs filesystem.
Date: Sat, 27 Oct 2018 13:19:33 -0700 [thread overview]
Message-ID: <20181027201933.wrquhmdrg3z2fa2o@merlins.org> (raw)
In-Reply-To: <d530a9d0-4cee-521b-6c95-ff56d0f7c130@georgianit.com>
On Sat, Oct 27, 2018 at 02:12:02PM -0400, Remi Gauvin wrote:
> On 2018-10-27 01:42 PM, Marc MERLIN wrote:
>
> >
> > I've been using btrfs for a long time now but I've never had a
> > filesystem where I had 15GB apparently unusable (7%) after a balance.
> >
>
> The space isn't unusable. It's just allocated.. (It's used in the sense
> that it's reserved for data chunks.). Start writing data to the drive,
> and the data will fill that space before more gets allocated.. (Unless
> you are using an older kernel and the filesystem gets mounted with ssd
> option, in which case, you'll want to add nossd option to prevent that
> behaviour.)
>
> You can use btrfs fi usage to display that more clearly.
Got it. I have disk space free alerts based on df, which I know doesn't
mean that much on btrfs. Maybe I'll just need to change that alert code
to make it btrfs aware.
> > I can try a defrag next, but since I have COW for snapshots, it's not
> > going to help much, correct?
>
> The defrag will end up using more space, as the fragmented parts of
> files will get duplicated. That being said, if you have the luxury to
> defrag *before* taking new snapshots, that would be the time to do it.
Thanks for confirming. Because I always have snapshots for btrfs
send/receive, defrag will duplicate as you say, but once the older
snapshots get freed up, the duplicate blocks should go away, correct?
Back to usage, thanks for pointing out that command:
saruman:/mnt/btrfs_pool1# btrfs fi usage .
Overall:
Device size: 228.67GiB
Device allocated: 203.54GiB
Device unallocated: 25.13GiB
Device missing: 0.00B
Used: 192.01GiB
Free (estimated): 32.44GiB (min: 19.88GiB)
Data ratio: 1.00
Metadata ratio: 2.00
Global reserve: 512.00MiB (used: 0.00B)
Data,single: Size:192.48GiB, Used:185.16GiB
/dev/mapper/pool1 192.48GiB
Metadata,DUP: Size:5.50GiB, Used:3.42GiB
/dev/mapper/pool1 11.00GiB
System,DUP: Size:32.00MiB, Used:48.00KiB
/dev/mapper/pool1 64.00MiB
Unallocated:
/dev/mapper/pool1 25.13GiB
I'm still seing that I'm using 192GB, but 203GB allocated.
Do I have 25GB usable:
Device unallocated: 25.13GiB
Or 35GB usable?
Device size: 228.67GiB
-
Used: 192.01GiB
= 36GB ?
Yes I know that I shouldn't get close to filling up the device, just
trying to clear up if I should stay below 25GB or below 35GB
Thanks,
Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ | PGP 7F55D5F27AAF9D08
next prev parent reply other threads:[~2018-10-27 20:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-24 0:36 Have 15GB missing in btrfs filesystem Marc MERLIN
2018-10-24 4:53 ` Andrei Borzenkov
2018-10-24 5:07 ` Qu Wenruo
2018-10-27 17:42 ` Marc MERLIN
2018-10-27 18:12 ` Remi Gauvin
2018-10-27 20:19 ` Marc MERLIN [this message]
2018-10-27 21:20 ` Remi Gauvin
2018-10-27 20:44 ` Andrei Borzenkov
2018-10-27 23:27 ` Qu Wenruo
2018-10-28 1:46 ` Marc MERLIN
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=20181027201933.wrquhmdrg3z2fa2o@merlins.org \
--to=marc@merlins.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=remi@georgianit.com \
/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