linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] LVM2 snapshotting and new blocks
@ 2012-07-23 13:27 Fred van Zwieten
  2012-07-23 14:22 ` Stuart D Gathman
  0 siblings, 1 reply; 2+ messages in thread
From: Fred van Zwieten @ 2012-07-23 13:27 UTC (permalink / raw)
  To: linux-lvm

Hi,

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?

Fred

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [linux-lvm] LVM2 snapshotting and new blocks
  2012-07-23 13:27 [linux-lvm] LVM2 snapshotting and new blocks Fred van Zwieten
@ 2012-07-23 14:22 ` Stuart D Gathman
  0 siblings, 0 replies; 2+ messages in thread
From: Stuart D Gathman @ 2012-07-23 14:22 UTC (permalink / raw)
  To: linux-lvm

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?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-23 14:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-23 13:27 [linux-lvm] LVM2 snapshotting and new blocks Fred van Zwieten
2012-07-23 14:22 ` Stuart D Gathman

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).