All of lore.kernel.org
 help / color / mirror / Atom feed
* snapshotting - what data gets shared?
@ 2010-07-14 21:27 Mathijs Kwik
  2010-07-14 22:13 ` Sean Bartell
  0 siblings, 1 reply; 5+ messages in thread
From: Mathijs Kwik @ 2010-07-14 21:27 UTC (permalink / raw)
  To: linux-btrfs

Hi all,

I'm used to snapshots with LVM and I would like to compare them to btrfs.

The case I want to compare is the following:
At the moment a snapshot is created, no extra space is needed (maybe
some metadata overhead) and all data is shared between the original
and the snapshot.
In LVM, snapshots work at the block-level, so any changes done to the
original volume trigger a COW to the snapshot.
If LVM is configured to use 4Mb blocks (default), this means that
overwriting a 100k file, will lead to 4Mb "snapshot data" to be backed
up.
A 800Mb file will take around 800Mb.
So, for small files (that are not on the same extent/block) this can
waste quite some space, while for bigger files, or lots of files
"close" to each other, it doesn't matter much.

How is this for btrfs snapshots?
Do they work at the file-level? or also at blocks/extents?

I mean, does changing a 100k file lead to 100k being snapshotted?

What would happen if I have a 20G file (for example a disk image for kvm)?
Would minor changes in that file lead to the entire 20G to be COWed/"backed up"?

Is there a distinction between data and metadata?
Or does touching (ctime/mtime) or visiting (atime) a file cause it to be COWed?

Thanks for any info on this.
Mathijs

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

end of thread, other threads:[~2010-07-15  8:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-14 21:27 snapshotting - what data gets shared? Mathijs Kwik
2010-07-14 22:13 ` Sean Bartell
2010-07-15  8:01   ` Mathijs Kwik
2010-07-15  8:50     ` remi.urbillac
2010-07-15  8:57     ` remi.urbillac

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.