linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Stuart D Gathman <stuart@bmsi.com>
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] LVM2 snapshotting and new blocks
Date: Mon, 23 Jul 2012 10:22:29 -0400	[thread overview]
Message-ID: <500D5E25.8050004@bmsi.com> (raw)
In-Reply-To: <CALVifsbrDh=CmFoAegg1Q-E6maNGaCPRugmGONkr+wg045xH_w@mail.gmail.com>

Long ago, Nostradamus foresaw that on 07/23/2012 09:27 AM, Fred van
Zwieten would write:
> I have a question. I am used to the NetApp snapshotting
> implementation. These are what I call "new block" aware. This means a
> block is only held in a snapshot when the changed block was already in
> use. This means when new blocks are written they will not get snapped.
> This is a great feature.
>
> I have done some tests with LVM2 snapshots on Fedora17 and this seems
> not to be the case in the LVM2 implementation. Can someone confirm
> this?
>
No need for any tests.  That feature requires detailed knowledge of the
filesystem in use.  LVM is filesystem agnostic, and doesn't care what
kind of filesystem you put on your logical volumes. 

Btrfs provides snapsnots with the feature you want - but, of course, you
have to use the btrfs filesystem.

There is a tradeoff.  Being filesystem agnostic means that *any*
filesystem, including one that you just invented and are currently
developing, works.  But there are certainly efficiency gains to be had
from knowledge of and cooperation with the filesystem.

That said, there is currently the DISCARD API, which lets filesystems
tell the underlying block device (including LVM) that we don't care
about a block anymore (which makes for more efficient recycling on flash
devices among other things).

1) can the "new block" feature be implemented by having a filesystem
DISCARDing a block before writing it the first time?

2) failing that, would a NEWBLOCK API that filesystems could use make sense?

      reply	other threads:[~2012-07-23 14:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-23 13:27 [linux-lvm] LVM2 snapshotting and new blocks Fred van Zwieten
2012-07-23 14:22 ` Stuart D Gathman [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=500D5E25.8050004@bmsi.com \
    --to=stuart@bmsi.com \
    --cc=linux-lvm@redhat.com \
    /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).