From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CD9DC46499 for ; Fri, 5 Jul 2019 19:56:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2013A2133F for ; Fri, 5 Jul 2019 19:56:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727768AbfGET4m (ORCPT ); Fri, 5 Jul 2019 15:56:42 -0400 Received: from smtp02.belwue.de ([129.143.71.87]:49124 "EHLO smtp02.belwue.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725884AbfGET4m (ORCPT ); Fri, 5 Jul 2019 15:56:42 -0400 Received: from fex.rus.uni-stuttgart.de (fex.rus.uni-stuttgart.de [129.69.1.129]) by smtp02.belwue.de (Postfix) with SMTP id 646C6846C for ; Fri, 5 Jul 2019 21:56:39 +0200 (MEST) Date: Fri, 5 Jul 2019 21:56:39 +0200 From: Ulli Horlacher To: linux-btrfs@vger.kernel.org Subject: Re: delete recursivly subvolumes? Message-ID: <20190705195639.GD23600@tik.uni-stuttgart.de> Mail-Followup-To: linux-btrfs@vger.kernel.org References: <20190705193945.GB23600@tik.uni-stuttgart.de> <20190705194720.GC23600@tik.uni-stuttgart.de> <20190705195142.GQ32479@carfax.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190705195142.GQ32479@carfax.org.uk> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Fri 2019-07-05 (19:51), Hugo Mills wrote: > > Is there a command/script/whatever to snapshot (copy) a subvolume which > > contains (somewhere) other subvolumes? > > > > Example: > > > > root@xerus:/test# btrfs_subvolume_list /test/ | grep /tmp > > /test/tmp > > /test/tmp/xx/ss1 > > /test/tmp/xx/ss2 > > /test/tmp/xx/ss3 > > > > I want to have (with one command): > > > > /test/tmp --> /test/tmp2 > > /test/tmp/xx/ss1 --> /test/tmp2/xx/ss1 > > /test/tmp/xx/ss2 --> /test/tmp2/xx/ss2 > > /test/tmp/xx/ss3 --> /test/tmp2/xx/ss3 > > Remember that this isn't quite so useful, because you can't make > read-only snapshots in that structure. ss1 ss2 and ss3 are indeed read-only snapshots! Of course they do not contain other subvolumes. > Generally, I'd recommend not having nested subvols at all, but to > put every subvol independently, and mount them into the places you > want them to be. That avoids a lot of the issues of nested subvols, > such as the ones you're trying to deal with here. *I* do it this way from the very beginning :-) But I have *users* with *strange* ideas :-} I need to handle their data. -- Ullrich Horlacher Server und Virtualisierung Rechenzentrum TIK Universitaet Stuttgart E-Mail: horlacher@tik.uni-stuttgart.de Allmandring 30a Tel: ++49-711-68565868 70569 Stuttgart (Germany) WWW: http://www.tik.uni-stuttgart.de/ REF:<20190705195142.GQ32479@carfax.org.uk>