linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konstantinos Skarlatos <k.skarlatos@gmail.com>
To: kreijack@inwind.it
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] BTRFS-PROG: recursively subvolume snapshot and delete
Date: Wed, 27 Nov 2013 11:15:04 +0200	[thread overview]
Message-ID: <5295B818.4080906@gmail.com> (raw)
In-Reply-To: <5294DE1A.8010305@libero.it>

On 26/11/2013 7:44 μμ, Goffredo Baroncelli wrote:
> On 2013-11-26 16:12, Konstantinos Skarlatos wrote:
>> On 25/11/2013 11:23 μμ, Goffredo Baroncelli wrote:
>>> Hi all,
>>>
>>> nobody is interested in these new features ?
>> Is this ZFS-style recursive snapshotting? If yes, i am interested, and
>> thanks for your great work :)
> No it is not equal. My recursive snapshotting is not atomic as the ZFS
> one; every subvolume snapshot is atomic, but each snapshot is taken at
> different time.
For my use case that is not a problem, but others may disagree
>
> BR
> G.Baroncelli
>
>>> On 2013-11-16 18:09, Goffredo Baroncelli wrote:
>>>> Hi All,
>>>>
>>>> the following patches implement the recursively snapshotting and
>>>> deleting of a subvolume.
>>>>
>>>> To snapshot recursively you must pass the -R switch:
>>>>
>>>> # btrfs subvolume create sub1
>>>> Create subvolume './sub1'
>>>> # btrfs subvolume create sub1/sub2
>>>> Create subvolume 'sub1/sub2'
>>>>
>>>> # btrfs subvolume snapshot -R sub1 sub1-snap
>>>> Create a snapshot of 'sub1' in './sub1-snap'
>>>> Create a snapshot of 'sub1/sub2' in './sub1-snap/sub2'
>>>>
>>>> To recursively delete subvolumes, you must pass the switch '-R':
>>>>
>>>> # btrfs subvolume create sub1
>>>> Create subvolume './sub1'
>>>> # btrfs subvolume create sub1/sub2
>>>> Create subvolume 'sub1/sub2'
>>>>
>>>> # btrfs subvolume delete -R sub1
>>>> Delete subvolume '/root/sub1/sub2'
>>>> Delete subvolume '/root/sub1'
>>>>
>>>>
>>>> Some caveats:
>>>> 1) the recursively behaviour need the root capability
>>>> This because how the subvolume are discovered
>>>>
>>>> 2) it is not possible to recursively snapshot a subvolume
>>>> in read-only mode
>>>> This because when a subvolume is snapshotted, its
>>>> nested subvolumes appear as directory in the snapshot.
>>>> These directories are removed before snapshotting the
>>>> nested subvolumes. This is incompatible with a read
>>>> only subvolume.
>>>>
>>>> BR
>>>> G.Baroncelli
>>>>
>>>> -- 
>>>> To unsubscribe from this list: send the line "unsubscribe
>>>> linux-btrfs" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>
>> -- 
>> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>


  reply	other threads:[~2013-11-27  9:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-16 17:09 [PATCH] BTRFS-PROG: recursively subvolume snapshot and delete Goffredo Baroncelli
2013-11-16 17:09 ` [PATCH 1/7] Recursive btrfs sub snapshot/delete: create get_root_info() function Goffredo Baroncelli
2013-11-16 17:09 ` [PATCH 2/7] recursive btrfs sub snapshot/delete: create pathjoin() function Goffredo Baroncelli
2013-11-16 17:09 ` [PATCH 3/7] recursive btrfs snapshot/delete: create traverse_list_subvol_rec() Goffredo Baroncelli
2013-11-16 17:09 ` [PATCH 4/7] recursive btrfs subvol delete Goffredo Baroncelli
2013-11-16 17:09 ` [PATCH 5/7] recursively btrfs subvolume snapshot Goffredo Baroncelli
2013-11-16 17:09 ` [PATCH 6/7] btrfs subvolume snapshot -R: update man page Goffredo Baroncelli
2013-11-16 17:09 ` [PATCH 7/7] Document the -R switch for the "btrfs subvolume delete" command Goffredo Baroncelli
2013-11-25 21:23 ` [PATCH] BTRFS-PROG: recursively subvolume snapshot and delete Goffredo Baroncelli
2013-11-26 15:12   ` Konstantinos Skarlatos
2013-11-26 17:44     ` Goffredo Baroncelli
2013-11-27  9:15       ` Konstantinos Skarlatos [this message]
2013-11-27 17:04         ` Goffredo Baroncelli
2013-11-28 18:31 ` David Sterba
2013-11-28 19:23   ` Goffredo Baroncelli
2013-11-29 18:07     ` David Sterba
2013-11-29 19:09       ` Goffredo Baroncelli

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=5295B818.4080906@gmail.com \
    --to=k.skarlatos@gmail.com \
    --cc=kreijack@inwind.it \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).