All of lore.kernel.org
 help / color / mirror / Atom feed
From: pg@btrfs.list.sabi.co.UK (Peter Grandi)
To: Linux fs Btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: netapp-alike snapshots?
Date: Tue, 22 Aug 2017 19:36:19 +0100	[thread overview]
Message-ID: <22940.31139.194399.982315@tree.ty.sabi.co.uk> (raw)
In-Reply-To: <20170822180155.GM14804@rus.uni-stuttgart.de>

[ ... ]

>>>> It is beneficial to not have snapshots in-place. With a local
>>>> directory of snapshots, [ ... ]

Indeed and there is a fair description of some options for
subvolume nesting policies here which may be interesting to the
original poster:

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

It is unsurprising to me that there are tradeoffs involved in
every choice. I find the "Flat" layout particularly desirable.

>>> Netapp snapshots are invisible for tools doing opendir()/
>>> readdir() One could simulate this with symlinks for the
>>> snapshot directory: store the snapshot elsewhere (not inplace)
>>> and create a symlink to it, in every directory.

More precisely in every subvolume root directory.

>>> My users want the snapshots locally in a .snapshot
>>> subdirectory.

Btrfs snapshots can only be done for a whole subvolume. Subvolumes
and snapshots can be created by users, but too many snapshots (see
below) can cause trouble. For somewhat good reasons subvolumes
including snapshots cannot be deleted by users though unless mount
option 'user_subvol_rm_allowed' is used.

>>> Because Netapp do it this way - for at least 20 years and we
>>> have a multi-PB Netapp storage environment. No chance to change
>>> this.

Send patches :-).

> Not only du works recursivly, but also find and with option
> also ls, grep, etc.

Note also that subvolume root directory inodes are indeed root
directory inodes so they can be 'mount'ed and therefore the
transition from a subvolume into a contained subvolume can be
detected at the mountpoint.

So 'find' has the '-xdev' option and 'du' has the '-x' options and
so similarly nearly all other tools, so perhaps someone expects
that to happen :-).

> And it would require a bind mount for EVERY directory. There can
> be hundreds... thousends!

Assumptions that all Btrfs features such as snapshots are
infinitely scalable at no cost may be optimistic:

  https://btrfs.wiki.kernel.org/index.php/Gotchas#Having_many_subvolumes_can_be_very_slow

  reply	other threads:[~2017-08-22 18:38 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 [this message]
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

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=22940.31139.194399.982315@tree.ty.sabi.co.uk \
    --to=pg@btrfs.list.sabi.co.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.