You are not logged in.

#1 2024-02-13 21:57:27

dulhaver
Member
Registered: 2023-08-17
Posts: 11

problem with deleting btrfs subvolumes

I am running with btrfs and have messed up a little.

I have been playing around with incus (formerly LXD) and fail to start fresh after uninstalling the incus package by removing /var/lib/incus


I guess it is caused by having a subvolume still known to btrfs.

$ sudo btrfs subvolume list / | grep -we 356 -e 407
ID 356 gen 8264 top level 5 path @2024-02-13T21:06
ID 407 gen 7896 top level 356 path @2024-02-13T21:06/var/lib/incus/storage-pools/default
ID 412 gen 7772 top level 407 path @2024-02-13T21:06/var/lib/incus/storage-pools/default/containers-snapshots/deb12/pre-jdk8
ID 420 gen 8261 top level 407 path @2024-02-13T21:06/var/lib/incus/storage-pools/default/containers/deb12
ID 421 gen 7896 top level 407 path @2024-02-13T21:06/var/lib/incus/storage-pools/default/images/0ff1e44513058d4a1f03152c973d1c13f5da5756ac2bdf4b7a217350118d5e02

so I am wondering how can I delete those subvolumes on a btrfs level.
A simple rm -r /var/lib/incus fails with cannot remove '/var/lib/incus/storage-pools/default': Device or resource busy
Everything below the /var/lib/incus/storage-pools/default-level does only exist in the snapshot listing, but not on disk as in ls -l ..., or file ...

any suggestions would be welcome

Last edited by dulhaver (2024-02-13 22:01:53)

Offline

#2 2024-02-14 07:11:34

d.ALT
Member
Registered: 2019-05-10
Posts: 920

Re: problem with deleting btrfs subvolumes

dulhaver wrote:
ID 356 gen 8264 top level 5 path @2024-02-13T21:06
ID 407 gen 7896 top level 356 path @2024-02-13T21:06/var/lib/incus/storage-pools/default

cannot remove '/var/lib/incus/storage-pools/default': Device or resource busy

# btrfs subvolume delete -Ci 421 ###and so on...

I don't remebmer if $ROOT (356) has to be NOT in use.


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

Board footer

Powered by FluxBB