All of lore.kernel.org
 help / color / mirror / Atom feed
From: KC <impactoria@googlemail.com>
To: linux-btrfs@vger.kernel.org
Subject: Deleting subvolumes - there be dragons
Date: Wed, 29 Jan 2014 12:41:57 +0100	[thread overview]
Message-ID: <52E8E905.8030105@gmail.com> (raw)

I just read this article here: https://lwn.net/Articles/579009/  which 
states:

---------------------------------
btrfs subvolume delete path

  For ordinary subvolumes (as opposed to snapshots, described below), 
the subvolume indicated by path must be empty before it can be deleted.
---------------------------------

So I gave it a try:

$ sudo btrfs subvolume create /home2
$ sudo mkdir /home2/lalala
< copy a random pdf file into /home2/lalala) >
$ sudo btrfs subvolume delete /home2

And boom! It's all gone!
Even though subvolume was not empty.

So apart from the fact that it looks like the article is wrong here, it 
seems very dangerous to me that one simple command can nuke an entire 
volume, even if it's full of files and folders.

Of course I'm new to btrfs so maybe I'm reading something wrong. If so, 
then please do set me straight.

             reply	other threads:[~2014-01-29 11:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29 11:41 KC [this message]
2014-01-29 12:28 ` Deleting subvolumes - there be dragons Hugo Mills
2014-01-29 16:44 ` Chris Murphy

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=52E8E905.8030105@gmail.com \
    --to=impactoria@googlemail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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.