From: Andrei Borzenkov <arvidjaar@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: Re: how to delete a (hidden) snapshot from timeshift?
Date: Tue, 3 Sep 2024 20:16:33 +0300 [thread overview]
Message-ID: <02068ec1-efaf-494b-8b05-fe1ccd83924a@gmail.com> (raw)
In-Reply-To: <20240903132316.GA20488@tik.uni-stuttgart.de>
On 03.09.2024 16:23, Ulli Horlacher wrote:
>
> I have upgraded Mint 21 to Mint 22 with "mintupgrade" (Ubuntu 22 based).
> This calls timeshift and creates a btrfs snapshot which I wanted to delete
> afterwards:
>
> root@mux21:~# btrfs subvolume list /
> ID 256 gen 102469 top level 5 path @
> ID 257 gen 102467 top level 5 path @home
> ID 367 gen 102260 top level 256 path local/home
> ID 667 gen 102466 top level 256 path tmp
> ID 682 gen 102445 top level 5 path timeshift-btrfs/snapshots/2024-09-03_13-00-02/@
>
> root@mux21:~# btrfs subvolume del timeshift-btrfs/snapshots/2024-09-03_13-00-02/@
> ERROR: Could not statfs: No such file or directory
>
> root@mux21:~# btrfs subvolume del -i 682 timeshift-btrfs/snapshots/2024-09-03_13-00-02/@
> ERROR: Could not open: No such file or directory
>
The path should be path to the filesystem mount point (probably any
visible path), not path to the subvolume you are going to delete. The
latter is given by -i option.
>
> I have had to mount the / filesystem directly (no subvol) to remove this
> timeshift snapshot:
>
> root@mux21:~# lshd
> Device Size Type Label Mountpoint
> sda 30G ATA:GPT "VBOX_HARDDISK"
> sda1 0G vfat /boot/efi
> sda2 0G BIOS boot
> sda3 29G btrfs /
>
> root@mux21:~# mount /dev/sda3 /mnt/tmp
>
> root@mux21:~# l /mnt/tmp/
> dRWX - 2024-06-21 11:45 /mnt/tmp/@
> dRWX - 2024-03-07 13:00 /mnt/tmp/@home
> dRWX - 2024-09-03 13:00 /mnt/tmp/timeshift-btrfs
>
> root@mux21:~# btrfs subvolume list /mnt/tmp
> ID 256 gen 102473 top level 5 path @
> ID 257 gen 102471 top level 5 path @home
> ID 367 gen 102260 top level 256 path @/local/home
> ID 667 gen 102471 top level 256 path @/tmp
> ID 682 gen 102445 top level 5 path timeshift-btrfs/snapshots/2024-09-03_13-00-02/@
> ID 684 gen 102470 top level 257 path @home/.snapshot/2024-09-03_1500.hourly
>
> root@mux21:~# btrfs subvolume del /mnt/tmp/timeshift-btrfs/snapshots/2024-09-03_13-00-02/@
> Delete subvolume 682 (no-commit): '/mnt/tmp/timeshift-btrfs/snapshots/2024-09-03_13-00-02/@'
>
>
> Is there an easier way to remove hidden snapshots/subvolumes?
>
What so hard with it? But yes, "btrfs subvolume delete -i" will work
when used correctly.
next prev parent reply other threads:[~2024-09-03 17:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 13:23 how to delete a (hidden) snapshot from timeshift? Ulli Horlacher
2024-09-03 17:16 ` Andrei Borzenkov [this message]
2024-09-04 10:10 ` Ulli Horlacher
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=02068ec1-efaf-494b-8b05-fe1ccd83924a@gmail.com \
--to=arvidjaar@gmail.com \
--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