linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc MERLIN <marc@merlins.org>
To: Andrei Borzenkov <arvidjaar@gmail.com>, framstag@rus.uni-stuttgart.de
Cc: linux-btrfs@vger.kernel.org
Subject: Re: netapp-alike snapshots?
Date: Sun, 10 Sep 2017 07:54:30 -0700	[thread overview]
Message-ID: <20170910145430.zzxuvaqthob4ufrs@merlins.org> (raw)
In-Reply-To: <14c87878-a5a0-d7d3-4a76-c55812e751a3@gmail.com>

On Sat, Sep 09, 2017 at 10:43:16PM +0300, Andrei Borzenkov wrote:
> 09.09.2017 16:44, Ulli Horlacher пишет:
> > 
> > Your tool does not create .snapshot subdirectories in EVERY directory like
> 
> Neither does NetApp. Those "directories" are magic handles that do not
> really exist.
 
Correct, thanks for saving me typing the same thing (I actually did work
at netapp many years back, so I'm familiar with how they work)

> > Netapp does.
> > Example:
> > 
> > framstag@fex:~: cd ~/Mail/.snapshot/
> > framstag@fex:~/Mail/.snapshot: l
> > lR-X - 2017-09-09 09:55 2017-09-09_0000.daily -> /local/home/.snapshot/2017-09-09_0000.daily/framstag/Mail
> 
> Apart from obvious problem with recursive directory traversal (NetApp
> .snapshot are not visible with normal directory list) those will also be
> captured in snapshots and cannot be removed. NetApp snapshots themselves
> do not expose .snapshot "directories".

Correct. Netapp knows this of course, which is why those .snapshot
directories are "magic" and hidden to ls(1), find(1) and others when
they do a readdir(3)

> > lR-X - 2017-09-09 14:00 2017-09-09_1400.hourly -> /local/home/.snapshot/2017-09-09_1400.hourly/framstag/Mail
> > lR-X - 2017-09-09 15:00 2017-09-09_1500.hourly -> /local/home/.snapshot/2017-09-09_1500.hourly/framstag/Mail
> > lR-X - 2017-09-09 15:18 2017-09-09_1518.single -> /local/home/.snapshot/2017-09-09_1518.single/framstag/Mail
> > lR-X - 2017-09-09 15:20 2017-09-09_1520.single -> /local/home/.snapshot/2017-09-09_1520.single/framstag/Mail
> > lR-X - 2017-09-09 15:22 2017-09-09_1522.single -> /local/home/.snapshot/2017-09-09_1522.single/framstag/Mail
> > 
> > My users (and I) need snapshots in this way.

You are used to them being there, I was too :)
While you could create lots of symlinks, I opted not to since it would
have littered the filesystem.
I can simply cd $(SNAPROOT)/volname_hourly/$(PWD)
and end up where I wanted to be.

I suppose you could make a snapcd shell function that does this for you.
The only issue is that volname_hourly comes before the rest of the path,
so you aren't given a list of all the snapshots available for a given
path, you have to cd into the given snapshot first, and then add the
path.
I agree it's not as nice as netapp, but honestly I don't think you can
do better with btrfs at this point.

Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/                         | PGP 1024R/763BE901

      parent reply	other threads:[~2017-09-10 14:54 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-22 13:22 netapp-alike snapshots? Ulli Horlacher
2017-08-22 13:44 ` Peter Becker
2017-08-22 14:24   ` Ulli Horlacher
2017-08-22 16:08     ` Peter Becker
2017-08-22 16:48       ` Ulli Horlacher
2017-08-22 16:45     ` Roman Mamedov
2017-08-22 16:57       ` Ulli Horlacher
2017-08-22 17:19         ` A L
2017-08-22 18:01           ` Ulli Horlacher
2017-08-22 18:36             ` Peter Grandi
2017-08-22 20:48               ` Ulli Horlacher
2017-08-23  7:18                 ` number of subvolumes Ulli Horlacher
2017-08-23  8:37                   ` A L
2017-08-23 16:48                     ` Ferry Toth
2017-08-24 17:45                       ` Peter Grandi
2017-08-31  6:49                         ` Ulli Horlacher
2017-08-31 11:18                           ` Austin S. Hemmelgarn
2017-08-31 14:38                             ` Michał Sokołowski
2017-08-31 16:18                               ` Duncan
2017-09-01 10:21                                 ` ein
2017-09-01 11:47                                   ` Austin S. Hemmelgarn
2017-08-24 19:40                       ` Marat Khalili
2017-08-24 21:56                         ` Ferry Toth
2017-08-25  5:54                           ` Chris Murphy
2017-08-25 11:45                           ` Austin S. Hemmelgarn
2017-08-25 12:55                             ` Ferry Toth
2017-08-25 19:18                               ` Austin S. Hemmelgarn
2017-08-23 12:11                   ` Peter Grandi
2017-08-22 21:53               ` user snapshots Ulli Horlacher
2017-08-23  6:28                 ` Dmitrii Tcvetkov
2017-08-23  7:16                   ` Dmitrii Tcvetkov
2017-08-23  7:20                     ` Ulli Horlacher
2017-08-23 11:42                       ` Peter Grandi
2017-08-23 21:13                         ` Ulli Horlacher
2017-08-25 11:28                           ` Austin S. Hemmelgarn
2017-08-22 17:36         ` netapp-alike snapshots? Roman Mamedov
2017-08-22 18:10           ` Ulli Horlacher
2017-09-09 13:26 ` Ulli Horlacher
2017-09-09 13:36   ` Marc MERLIN
2017-09-09 13:44     ` Ulli Horlacher
2017-09-09 19:43       ` Andrei Borzenkov
2017-09-09 19:52         ` Ulli Horlacher
2017-09-10  7:10           ` A L
2017-09-10 14:54         ` Marc MERLIN [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=20170910145430.zzxuvaqthob4ufrs@merlins.org \
    --to=marc@merlins.org \
    --cc=arvidjaar@gmail.com \
    --cc=framstag@rus.uni-stuttgart.de \
    --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).