You are not logged in.

#1 2019-10-06 01:45:05

nstgc
Member
Registered: 2014-03-17
Posts: 393

Can't delete BTRFS subvol even though it has no subvolumes.

I'm trying to delete a subvolume, but I'm getting the error message `ERROR: Could not destroy subvolume/snapshot: Directory not empty`. I understand that the most common cause for this is there is another subvolume contained within the one being deleted. That is not the case here. I've checked with `btrfs sub list` and there are no subvolumes under the one I'm trying to delete. I've checked `dmesg|tail` immediately after making the attempt but there is no output. This isn't a problem at the moment, but I can see how it will eat up space in the future.

Offline

#2 2019-10-12 11:57:17

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

Re: Can't delete BTRFS subvol even though it has no subvolumes.

This sounds strange.
My only idea is: I would like to see for myself, the complete commands and output in the terminal.
Also please post an "btrfs sub list /"  for an complete overview  and an "ls -la" on the problem folder.

Offline

#3 2020-01-05 03:38:24

cmurf
Member
Registered: 2019-09-06
Posts: 27

Re: Can't delete BTRFS subvol even though it has no subvolumes.

It's possible these days to do rm -rf on a btrfs subvolume to delete it, essentially treating it as a directory. Just like a directory, this requires the right permissions, including being stopped by anything set with chattr +i. Whereas the privileged `sudo btrfs sub del` is only inhibited by the existence of a nested subvolume somewhere.

Offline

#4 2020-01-05 13:25:04

ratcheer
Member
Registered: 2011-10-09
Posts: 912

Re: Can't delete BTRFS subvol even though it has no subvolumes.

I have had this happen before. Somehow, I had gotten something "foreign" (I can't recall exactly what or how), into the subvolume. I just found it and deleted it normally, with rm. Then, the subv delete worked. I'm sorry I can't recall exactly what it was; it was a few years ago.

Offline

Board footer

Powered by FluxBB