You are not logged in.

#1 2019-10-23 05:49:56

goosestepping
Member
Registered: 2019-09-25
Posts: 79

[SOLVED] Cannot delete a btrfs subvolume...

Hello, I have got this:

[frankenstein@coprinus ~]$ sudo btrfs subvolume list -p /
ID 257 gen 1125178 parent 5 top level 5 path @
ID 258 gen 1125162 parent 5 top level 5 path @snapshots
ID 259 gen 1125178 parent 5 top level 5 path @home
ID 261 gen 58408 parent 257 top level 257 path var/lib/machines
ID 428 gen 58408 parent 257 top level 257 path var/lib/portables
ID 980 gen 1125175 parent 5 top level 5 path @swap
ID 996 gen 1125162 parent 258 top level 258 path @snapshots/root-231019

And I am trying to delete the @swap subvolume but whether I issue:

[frankenstein@coprinus ~]$ sudo btrfs subvolume delete @swap
ERROR: Could not statfs: No such file or directory

or:

[frankenstein@coprinus ~]$ sudo btrfs subvolume delete /.swap
Delete subvolume (no-commit): '//.swap'
ERROR: Could not destroy subvolume/snapshot: Invalid argument

It clearly isn't working.

Does anybody know how to do this?

Thank you...

Last edited by goosestepping (2019-10-23 06:19:40)

Offline

#2 2019-10-23 06:19:05

goosestepping
Member
Registered: 2019-09-25
Posts: 79

Re: [SOLVED] Cannot delete a btrfs subvolume...

Okay I got that one fixed, I had to:

sudo mount /dev/mapper/cryptroot -o subvolid=5 /mnt

And then:

sudo btrfs subvolume delete /mnt/@swap

big_smile

Offline

#3 2022-11-14 17:10:37

pal_bjartan
Member
Registered: 2022-11-13
Posts: 9

Re: [SOLVED] Cannot delete a btrfs subvolume...

Thanks for posting the solution! I was struggling with the same. Ofc, in retrospect, it makes sense that you have to mount the partition and not the root subvolume to access and delete the other subvolumes.

Last edited by pal_bjartan (2022-11-15 04:14:44)

Offline

Board footer

Powered by FluxBB