All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Murphy <lists@colorremedies.com>
To: Menion <menion@gmail.com>
Cc: Chris Murphy <lists@colorremedies.com>,
	Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: 14Gb of space lost after distro upgrade on BTFS root partition (long thread with logs)
Date: Tue, 28 Aug 2018 18:10:29 -0600	[thread overview]
Message-ID: <CAJCQCtQ8ML4tXke6c9cr+syoq30vKzRoN+by7vguS_zE6Z2DVw@mail.gmail.com> (raw)
In-Reply-To: <CAJVZm6dyJqBa7PoqRuiByKHxR4UWYCsT=V-sej8z+FZDxD99eA@mail.gmail.com>

On Tue, Aug 28, 2018 at 8:56 AM, Menion <menion@gmail.com> wrote:
> [sudo] password for menion:
> ID      gen     top level       path
> --      ---     ---------       ----
> 257     600627  5               <FS_TREE>/@
> 258     600626  5               <FS_TREE>/@home
> 296     599489  5
> <FS_TREE>/@apt-snapshot-release-upgrade-bionic-2018-08-27_15:29:55
> 297     599489  5
> <FS_TREE>/@apt-snapshot-release-upgrade-bionic-2018-08-27_15:30:08
> 298     599489  5
> <FS_TREE>/@apt-snapshot-release-upgrade-bionic-2018-08-27_15:33:30
>
> So, there are snapshots, right?

Yep. So you can use 'sudo btrfs fi du -s <pathtosnapshot>' to get a
report on  how much exclusive space is being used by each of those
snapshots and I'll bet it all adds up to about 10G or whatever you're
missing.

>The time stamp is when I have launched
> do-release-upgrade, but it didn't ask anything about snapshot, neither
> I asked for it.

Yep, not sure what's creating them or what the cleanup policy is (if
there is one). So it's worth asking in an Ubuntu forum what these
snapshots are where they came from and what cleans them up so you
don't run out of space, or otherwise how to configure it if you want
more space just because.

I mean, it's a neat idea. But also it needs to clean up after itself
if for no other reason than to avoid user confusion :-)


> If it is confirmed, how can I remove the unwanted snapshot, keeping
> the current "visible" filesystem contents
> Sorry, I am still learning BTRFS and I would like to avoid mistakes
> Bye

You can definitely use Btrfs specific tools to get rid of the
snapshots and not piss off Btrfs at all. However, if you delete them
behind the back of the thing that created them in the first place, it
might get pissed off if they just suddenly go missing. Sometimes those
tools want to do the cleanups because it's tracking the snapshots and
what their purpose is. So if they just go away, it's like having the
rug pulled out from under them.

Anyway:

'sudo btrfs sub del <pathtosubvolume>' will delete it.


Also, I can't tell you for sure what sort of write amplification Btrfs
contributes in your use case on eMMC compared to F2FS. Btrfs has a
"wandering trees" problem that F2FS doesn't have as big a problem.
It's not a big deal (probably) on other kinds of SSDs like SATA/SAS
and NVMe. But on eMMC? If it were SD Card I'd say you can keep using
Btrfs, and maybe mitigate the wandering trees with compression to
reduce overall writes. But if your eMMC is soldered onto a board, I
might consider F2FS instead. And Btrfs for other things.


-- 
Chris Murphy

      parent reply	other threads:[~2018-08-29  4:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-28  9:34 14Gb of space lost after distro upgrade on BTFS root partition (long thread with logs) Menion
2018-08-28 11:54 ` Qu Wenruo
2018-08-28 13:07   ` Menion
2018-08-28 13:22     ` Qu Wenruo
2018-08-28 13:47 ` Chris Murphy
2018-08-28 14:56   ` Menion
2018-08-28 15:27     ` Noah Massey
2018-08-28 15:47       ` Austin S. Hemmelgarn
2018-08-28 16:05         ` Noah Massey
2018-08-28 17:07           ` Austin S. Hemmelgarn
2018-08-28 17:25             ` Menion
2018-08-28 18:06               ` Noah Massey
     [not found]                 ` <CAJVZm6dpfQghX+cCo=LkqZMAtFfCMKtq+XHpNGb6wH8z8eMcQA@mail.gmail.com>
2018-08-28 19:47                   ` Austin S. Hemmelgarn
2018-08-29  0:16                   ` Chris Murphy
2018-08-29  0:10     ` Chris Murphy [this message]

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=CAJCQCtQ8ML4tXke6c9cr+syoq30vKzRoN+by7vguS_zE6Z2DVw@mail.gmail.com \
    --to=lists@colorremedies.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=menion@gmail.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 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.