You are not logged in.

#1 2023-07-10 04:24:58

sswybd
Member
Registered: 2023-06-07
Posts: 13

[STICKY]cant del timeshift snapshots in btrfs and can't find subvolume

                   can't delete timeshift snapshots in btrfs and can't find subvolume to manually delete it
I had the same problem with https://bbs.archlinux.org/viewtopic.php?id=266965 and I tried both the poster's and the last person's methods (they're only slightly different) but they simply didn't work.
For example:

sh% sudo btrfs subvolume list /                                                                                             
[sudo] password for sswybd: 
ID 256 gen 4959 top level 5 path timeshift-btrfs/snapshots/2023-05-04_13-30-10/@
ID 258 gen 14 top level 256 path timeshift-btrfs/snapshots/2023-05-04_13-30-10/@/var/lib/portables
ID 259 gen 15 top level 256 path timeshift-btrfs/snapshots/2023-05-04_13-30-10/@/var/lib/machines
ID 351 gen 5116 top level 5 path @home
ID 352 gen 5116 top level 5 path @

and when I:

sudo timeshift --delete --snapshot '2023-05-04_13-30-10' 

it shows:

Mounted '/dev/nvme0n1p7' at '/run/timeshift/6377/backup'
btrfs: Quotas are not enabled
------------------------------------------------------------------------------
Removing snapshot: 2023-05-04_13-30-10
Deleting subvolume: @ (Id:256)
E: ERROR: Could not destroy subvolume/snapshot: Directory not empty

E: Failed to delete snapshot subvolume: '/run/timeshift/6377/backup/timeshift-btrfs/snapshots/2023-05-04_13-30-10/@'
E: Failed to remove snapshot: 2023-05-04_13-30-10

Then I tried that post's last person's method and use the path: "/run/timeshift/6377/backup/timeshift-btrfs/snapshots/2023-05-04_13-30-10/@", i.e:

 sudo btrfs subvolume delete /run/timeshift/6377/backup/timeshift-btrfs/snapshots/2023-05-04_13-30-10/@

it shows: ERROR: Could not statfs: No such file or directory
I then tried the four-digit number 4959 and no work. I retried "sudo timeshift --delete --snapshot '2023-05-04_13-30-10' " and it shows a different 4-digit number which is growing randomly and can't be predicted. I tried use "cd" and "ls" to find the path but in "/run/timeshift/" there simply isn't any folder or nothing. So how can I delete this subvolume?

Last edited by sswybd (2023-07-19 21:42:03)

Offline

#2 2023-07-14 19:28:50

ua4000
Member
Registered: 2015-10-14
Posts: 485

Re: [STICKY]cant del timeshift snapshots in btrfs and can't find subvolume

recheck the output of

sudo btrfs subvolume list /                                                                                             

a line with

ID 256 gen 4959 top level 5 path timeshift-btrfs/snapshots/2023-05-04_13-30-10/@

can be deleted with prefixed "/" (which was the base in your 1st command)

sudo btrfs subvolume delete '/timeshift-btrfs/snapshots/2023-05-04_13-30-10/@'

It may be necessary to recursively delete the child subvolumes first.

Offline

#3 2023-07-19 21:41:22

sswybd
Member
Registered: 2023-06-07
Posts: 13

Re: [STICKY]cant del timeshift snapshots in btrfs and can't find subvolume

ua4000 wrote:
sudo btrfs subvolume delete '/timeshift-btrfs/snapshots/2023-05-04_13-30-10/@'

It still doesn;t workout because it cannot find this file or directory. The main point is the four-digit number as described above and the number is constantly changing and I can;t find the right path at all. In GUI I also can't locate the position of the subvolume.

Offline

#4 2023-07-19 22:14:34

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,193

Re: [STICKY]cant del timeshift snapshots in btrfs and can't find subvolume

Um, this really is not "sticky".  Only a moderator can do that, and this does not rise to the criteria


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2023-07-20 16:39:57

ua4000
Member
Registered: 2015-10-14
Posts: 485

Re: [STICKY]cant del timeshift snapshots in btrfs and can't find subvolume

run

sudo btrfs subvolume list /                                                                                             

and then the delete command from my posting #2  directly afterwards, you have to adjust the name according to the output of your 1st  command of course, do not copy simply mine.
Also I checked: you have to delete the subvolume first!

Post all commands and outputs here, with a "It still doesn;t workout" answer we can't help you :-)

Offline

#6 2023-07-20 17:37:11

just4arch
Member
Registered: 2023-01-07
Posts: 99

Re: [STICKY]cant del timeshift snapshots in btrfs and can't find subvolume

You can also delete them by id (from the list).

btrfs subvolume delete [options] -i|--subvolid <subvolid> <path>

To be sure, I'd mount the root volume somewhere and use this as *path*.
And start from the deepest nesting level.

Offline

#7 2024-08-08 12:34:47

Suffering_arch_user
Member
Registered: 2024-06-08
Posts: 7

Re: [STICKY]cant del timeshift snapshots in btrfs and can't find subvolume

No one really helps in these forums huh

Offline

#8 2024-08-08 14:41:06

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 2,111
Website

Re: [STICKY]cant del timeshift snapshots in btrfs and can't find subvolume

Do not
1) necrobump
2) flame

Closing this old thread.


Inofficial first vice president of the Rust Evangelism Strike Force

Online

Board footer

Powered by FluxBB