From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f173.google.com ([209.85.223.173]:46632 "EHLO mail-io0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726807AbeH1Xkw (ORCPT ); Tue, 28 Aug 2018 19:40:52 -0400 Received: by mail-io0-f173.google.com with SMTP id y12-v6so2473698ioj.13 for ; Tue, 28 Aug 2018 12:47:43 -0700 (PDT) Subject: Re: 14Gb of space lost after distro upgrade on BTFS root partition (long thread with logs) To: Menion , Noah Massey Cc: Chris Murphy , linux-btrfs References: From: "Austin S. Hemmelgarn" Message-ID: Date: Tue, 28 Aug 2018 15:47:39 -0400 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Sender: linux-btrfs-owner@vger.kernel.org List-ID: On 2018-08-28 15:14, Menion wrote: > You are correct, indeed in order to cleanup you need > > 1) someone realize that snapshots have been created > 2) apt-brtfs-snapshot is manually installed on the system Your second requirement is only needed if you want the nice automated cleanup. There's absolutely nothing preventing you from manually removing the snapshots. > > Assuming also that the snapshots created during do-release-upgrade are > managed for auto cleanup > > Il martedì 28 agosto 2018, Noah Massey > ha scritto: > > On Tue, Aug 28, 2018 at 1:25 PM Menion > wrote: > > > > Ok, I have removed the snapshot and the free expected space is > here, thank you! > > As a side note: apt-btrfs-snapshot was not installed, but it is > > present in Ubuntu repository and I have used it (and I like the idea > > of automatic snapshot during upgrade) > > This means that the do-release-upgrade does it's own job on BTRFS, > > silently which I believe is not good from the usability perspective, > > You are correct. DistUpgradeController.py from python3-distupgrade > imports 'apt_btrfs_snapshot', which I read as coming from > /usr/lib/python3/dist-packages/apt_btrfs_snapshot.py, supplied by > apt-btrfs-snapshot, but I missed the fact that python3-distupgrade > ships its own > /usr/lib/python3/dist-packages/DistUpgrade/apt_btrfs_snapshot.py > > So now it looks like that cannot be easily disabled, and without the > apt-btrfs-snapshot package scheduling cleanups it's not ever > automatically removed? > > > just google it, there is no mention of this behaviour > > Il giorno mar 28 ago 2018 alle ore 19:07 Austin S. Hemmelgarn > > > ha scritto: > > > > > > On 2018-08-28 12:05, Noah Massey wrote: > > > > On Tue, Aug 28, 2018 at 11:47 AM Austin S. Hemmelgarn > > > > > wrote: > > > >> > > > >> On 2018-08-28 11:27, Noah Massey wrote: > > > >>> On Tue, Aug 28, 2018 at 10:59 AM Menion > wrote: > > > >>>> > > > >>>> [sudo] password for menion: > > > >>>> ID      gen     top level       path > > > >>>> --      ---     ---------       ---- > > > >>>> 257     600627  5               /@ > > > >>>> 258     600626  5               /@home > > > >>>> 296     599489  5 > > > >>>> > /@apt-snapshot-release-upgrade-bionic-2018-08-27_15:29:55 > > > >>>> 297     599489  5 > > > >>>> > /@apt-snapshot-release-upgrade-bionic-2018-08-27_15:30:08 > > > >>>> 298     599489  5 > > > >>>> > /@apt-snapshot-release-upgrade-bionic-2018-08-27_15:33:30 > > > >>>> > > > >>>> So, there are snapshots, right? The time stamp is when I > have launched > > > >>>> do-release-upgrade, but it didn't ask anything about > snapshot, neither > > > >>>> I asked for it. > > > >>> > > > >>> This is an Ubuntu thing > > > >>> `apt show apt-btrfs-snapshot` > > > >>> which "will create a btrfs snapshot of the root filesystem > each time > > > >>> that apt installs/removes/upgrades a software package." > > > >> Not Ubuntu, Debian.  It's just that Ubuntu installs and > configures the > > > >> package by default, while Debian does not. > > > > > > > > Ubuntu also maintains the package, and I did not find it in > Debian repositories. > > > > I think it's also worth mentioning that these snapshots were > created > > > > by the do-release-upgrade script using the package directly, > not as a > > > > result of the apt configuration. Meaning if you do not want a > snapshot > > > > taken prior to upgrade, you have to remove the apt-btrfs-snapshot > > > > package prior to running the upgrade script. You cannot just > update > > > > /etc/apt/apt.conf.d/80-btrfs-snapshot > > > Hmm... I could have sworn that it was in the Debian repositories. > > > > > > That said, it's kind of stupid that the snapshot is not trivially > > > optional for a release upgrade.  Yes, that's where it's > arguably the > > > most important, but it's still kind of stupid to have to remove a > > > package to get rid of that behavior and then reinstall it again > afterwards. >