linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: Recursive delete file from all subvolumes (snapshots)
Date: Fri, 15 Jan 2016 15:25:45 +0000 (UTC)	[thread overview]
Message-ID: <pan$96882$cf03c2f8$4732e856$90f35253@cox.net> (raw)
In-Reply-To: 5247876.zUN2tVm85X@discus

Wolfgang Mader posted on Fri, 15 Jan 2016 14:33:27 +0100 as excerpted:

>> Of course that implies that the root containing all the snapshots is
>> itself mounted or otherwise nested in the mounted tree, somewhere.  The
>> recommendation is to keep it unmounted and not directly accessible, by
>> default, only mounting the snapshots root when you are directly working
>> with the snapshots.
> 
> As far as I know, snapper puts its snapshots under .snapshots in the
> root of the snapshoted subvolume. As I want to work with the subvolume,
> it is mounted,
> and with it its snapshots. So, according to your answer, I should figure
> out how to change the location at which snapper places its snapshots.
> The subvolumes snapper creates as ro, which gives some protection
> against unwanted changes.

There's a suggested layout on the wiki:

https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Managing_Snapshots

I'd suggest something like the "even flatter" layout, since it emphasizes 
that snapshots are simply subvolumes that happen to be a snapshot of 
whatever subvolume at some particular moment.

That way, as the wiki discusses, rolling back is simply a matter of 
mounting the appropriate snapshot in place of the what was the working 
copy.

Tho you do have to ensure that toplevel (ID 5) is mounted any time you're 
working with snapshots, which means the snapshot creation script (snapper 
for you I guess) would need to mount it before taking the snapshot, and 
umount it after -- probably using a lockfile to determine whether it 
should umount, so you could create that lockfile any time you're working 
with toplevel mounted manually, to keep the hourly snapshot script from 
umounting it.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


      reply	other threads:[~2016-01-15 15:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-15  8:33 Recursive delete file from all subvolumes (snapshots) Wolfgang Mader
2016-01-15  9:05 ` Roman Mamedov
2016-01-15  9:11   ` Wolfgang Mader
2016-01-15 11:48   ` Duncan
2016-01-15 13:33     ` Wolfgang Mader
2016-01-15 15:25       ` Duncan [this message]

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='pan$96882$cf03c2f8$4732e856$90f35253@cox.net' \
    --to=1i5t5.duncan@cox.net \
    --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).