* ERROR: Could not destroy subvolume/snapshot: Directory not empty
@ 2020-04-20 10:05 Nick Gilmour
2020-04-20 10:34 ` Roman Mamedov
0 siblings, 1 reply; 3+ messages in thread
From: Nick Gilmour @ 2020-04-20 10:05 UTC (permalink / raw)
To: Btrfs BTRFS
Hi all,
I'm trying to delete some older broken subvolumes, but I'm getting
following error:
# btrfs subvolume delete /tlsv5/@.broken.20190830a
Delete subvolume (no-commit): '/tlsv5/@.broken.20190830a'
ERROR: Could not destroy subvolume/snapshot: Directory not empty
The output of my subvolumes list looks like this:
# btrfs subvolume list -a /
ID 257 gen 1097743 top level 5 path <FS_TREE>/@.broken.20190830a
ID 258 gen 1097611 top level 5 path <FS_TREE>/@snapshots
ID 259 gen 1097759 top level 5 path <FS_TREE>/@opt
ID 260 gen 1097808 top level 5 path <FS_TREE>/@tmp
ID 261 gen 1097806 top level 5 path <FS_TREE>/@log
ID 262 gen 1097612 top level 5 path <FS_TREE>/@pkg
ID 263 gen 1047152 top level 5 path <FS_TREE>/@machines
ID 264 gen 1097706 top level 5 path <FS_TREE>/@usr_local
ID 272 gen 116 top level 258 path <FS_TREE>/@snapshots/1/snapshot
ID 301 gen 22476 top level 258 path <FS_TREE>/@snapshots/2/snapshot
ID 302 gen 22481 top level 258 path <FS_TREE>/@snapshots/3/snapshot
ID 324 gen 54829 top level 257 path
<FS_TREE>/@.broken.20190830a/var/lib/portables
ID 351 gen 268851 top level 257 path
<FS_TREE>/@.broken.20190830a/var/lib/docker/btrfs/subvolumes/641bd5ec86e1c5e1f2d504a0656da736bafb858551067aca7f1b84c24c1e7d33
...
Am I doing it wrong or how can I force the deletion of this subvolume?
Thanks.
Regards,
Nick
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ERROR: Could not destroy subvolume/snapshot: Directory not empty
2020-04-20 10:05 ERROR: Could not destroy subvolume/snapshot: Directory not empty Nick Gilmour
@ 2020-04-20 10:34 ` Roman Mamedov
2020-04-20 10:49 ` Nick Gilmour
0 siblings, 1 reply; 3+ messages in thread
From: Roman Mamedov @ 2020-04-20 10:34 UTC (permalink / raw)
To: Nick Gilmour; +Cc: Btrfs BTRFS
On Mon, 20 Apr 2020 12:05:58 +0200
Nick Gilmour <nickeforos@gmail.com> wrote:
> # btrfs subvolume delete /tlsv5/@.broken.20190830a
>
> Delete subvolume (no-commit): '/tlsv5/@.broken.20190830a'
> ERROR: Could not destroy subvolume/snapshot: Directory not empty
It appears like it contains a few other subvolumes:
> ID 324 gen 54829 top level 257 path
> <FS_TREE>/@.broken.20190830a/var/lib/portables
> ID 351 gen 268851 top level 257 path
> <FS_TREE>/@.broken.20190830a/var/lib/docker/btrfs/subvolumes/641bd5ec86e1c5e1f2d504a0656da736bafb858551067aca7f1b84c24c1e7d33
> ...
Even though it doesn't really "contain" them for the purposes of snapshotting,
for deletion you first have to remove all the nested ones.
I believe in recent enough kernels the regular "rmdir" call is able to remove
empty subvolumes, so doing an "rm -rf" on the subvolume you want to remove
will take care of all the nested ones (if any). Or if there's just a couple,
then just remove them manually first.
--
With respect,
Roman
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ERROR: Could not destroy subvolume/snapshot: Directory not empty
2020-04-20 10:34 ` Roman Mamedov
@ 2020-04-20 10:49 ` Nick Gilmour
0 siblings, 0 replies; 3+ messages in thread
From: Nick Gilmour @ 2020-04-20 10:49 UTC (permalink / raw)
To: Roman Mamedov; +Cc: Btrfs BTRFS
Thanks!
I did:
# rm -rf /tlsv5/@.broken.20200319a
and it took less than 1 minute to finish.
Regards,
Nick
On Mon, Apr 20, 2020 at 12:34 PM Roman Mamedov <rm@romanrm.net> wrote:
>
> On Mon, 20 Apr 2020 12:05:58 +0200
> Nick Gilmour <nickeforos@gmail.com> wrote:
>
> > # btrfs subvolume delete /tlsv5/@.broken.20190830a
> >
> > Delete subvolume (no-commit): '/tlsv5/@.broken.20190830a'
> > ERROR: Could not destroy subvolume/snapshot: Directory not empty
>
> It appears like it contains a few other subvolumes:
>
> > ID 324 gen 54829 top level 257 path
> > <FS_TREE>/@.broken.20190830a/var/lib/portables
> > ID 351 gen 268851 top level 257 path
> > <FS_TREE>/@.broken.20190830a/var/lib/docker/btrfs/subvolumes/641bd5ec86e1c5e1f2d504a0656da736bafb858551067aca7f1b84c24c1e7d33
> > ...
>
> Even though it doesn't really "contain" them for the purposes of snapshotting,
> for deletion you first have to remove all the nested ones.
>
> I believe in recent enough kernels the regular "rmdir" call is able to remove
> empty subvolumes, so doing an "rm -rf" on the subvolume you want to remove
> will take care of all the nested ones (if any). Or if there's just a couple,
> then just remove them manually first.
>
> --
> With respect,
> Roman
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-20 10:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-20 10:05 ERROR: Could not destroy subvolume/snapshot: Directory not empty Nick Gilmour
2020-04-20 10:34 ` Roman Mamedov
2020-04-20 10:49 ` Nick Gilmour
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.