All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roman Mamedov <rm@romanrm.net>
To: Nick Gilmour <nickeforos@gmail.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: ERROR: Could not destroy subvolume/snapshot: Directory not empty
Date: Mon, 20 Apr 2020 15:34:49 +0500	[thread overview]
Message-ID: <20200420153449.3bd2d339@natsu> (raw)
In-Reply-To: <CAH-droy1qkV0mfWY5ojRVej7fGnznmSiN9+sPoxvPF2Oy5JSLA@mail.gmail.com>

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

  reply	other threads:[~2020-04-20 10:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20 10:05 ERROR: Could not destroy subvolume/snapshot: Directory not empty Nick Gilmour
2020-04-20 10:34 ` Roman Mamedov [this message]
2020-04-20 10:49   ` Nick Gilmour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200420153449.3bd2d339@natsu \
    --to=rm@romanrm.net \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nickeforos@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.