On 2014-12-01 08:54, MegaBrutal wrote:
2014-12-01 14:47 GMT+01:00 Roman Mamedov <r...@romanrm.net>:
On Mon, 1 Dec 2014 14:38:16 +0100
MegaBrutal <megabru...@gmail.com> wrote:

I've also noticed, a subvolume can just be deleted with an "rm -r",
just like an ordinary directory. I'd consider to only allow subvolume
deletions with exact "btrfs subvolume delete" commands, and they

This is already the case. 'rm -r' will remove all files in a subvolume, but
the empty subvolume itself is only deletable via the 'btrfs' command.

That's great! And there is no way to protect against recursive
deletions (besides setting the subvolume read-only, as you suggested
below), as files are processes individually by "rm". But it's OK,
people should always be very careful with "rm", and it doesn't change
with btrfs. ;)


If you want to make snapshots which can't be removed by ordinary tools, use
the 'read-only' mode when creating them.

Yeah, good idea! Anyway, is it possible to change a read-only snapshot
to read-write and vica-versa, or you can only specify read-only while
creating them?

IIRC, there is something that you can do with the properties interface.
Personally though, I just make the snapshot RW to start with, and then recursively make it immutable (chattr -r +I), as I never use immutable files for anything else, and it works on any _sane_ filesystem, not just btrfs.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to