From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from meiko.romanrm.net ([195.154.97.166]:52650 "EHLO meiko.romanrm.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753412AbaLANrv (ORCPT ); Mon, 1 Dec 2014 08:47:51 -0500 Date: Mon, 1 Dec 2014 18:47:49 +0500 From: Roman Mamedov To: MegaBrutal Cc: linux-btrfs , Marc MERLIN , Shriramana Sharma , Austin S Hemmelgarn Subject: Re: Possible to undo subvol delete? Message-ID: <20141201184749.0fd67b62@natsu> In-Reply-To: References: <20141130042306.GE8916@merlins.org> <547C6922.6030206@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-btrfs-owner@vger.kernel.org List-ID: On Mon, 1 Dec 2014 14:38:16 +0100 MegaBrutal 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. If you want to make snapshots which can't be removed by ordinary tools, use the 'read-only' mode when creating them. -- With respect, Roman