linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] LVM and chain of snapshots
@ 2016-01-20 10:37 Марк Коренберг
  2016-01-20 12:09 ` Zdenek Kabelac
  0 siblings, 1 reply; 6+ messages in thread
From: Марк Коренберг @ 2016-01-20 10:37 UTC (permalink / raw)
  To: linux-lvm, Alexander Patrakov,
	Георгий Бажуков

[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]

I am aware that this subject was raised in mailing lists, but I haven't
found an obvious solution there.

Why not to add an option to lvcreate when creating snapshots, to switch
origin and snapshot ?

I mean that while (in this mode) creating snapshot named xxx of volume name
yyy, the following should be done:

1. xxx-real dmsetup volume is created with identical table as in yyy
2. yyy-cow dmsetup volume is created to store snapshot data
3. yyy is switched to table "snapshot xxx-real yyy-cow"
4. xxx created as "snapshot-origin xxx-real"

So, if FS was mounted from yyy, after creating such snapshot, all writes on
that FS should go to yyy-cow actually.

Note, performance of the writes to yyy will not be affected (comparing to
creating generic snapshot as usual).

At this stage, picture is the following:

[original=linear=xxx] -> [snapshot=yyy referring xxx (mounted FS)]

Next, user may decide to create new snapshot named zzz of volume yyy in
this new mode. After that picture will look like:

[original=linear=xxx] -> [snapshot=zzz referring xxx] -> [snapshot=yyy
referring zzz (mounted FS)]

Note, that having  plenty snapshots in that mode will not affect write
performance of yyy. Yes, performance of read operations may slightly suffer
since require to lookup chain of snapshots, but this is much less
performance impact comparing to writes to original when plenty snapshots
created (in generic mode).

Next, this structure allows merging (i.e. zzz into xxx for example)
snapshots in chain easily.

P.S. we may call this operation "split origin" instead of "create snapshot"

-- 
Segmentation fault

[-- Attachment #2: Type: text/html, Size: 2053 bytes --]

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

end of thread, other threads:[~2016-01-20 14:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-20 10:37 [linux-lvm] LVM and chain of snapshots Марк Коренберг
2016-01-20 12:09 ` Zdenek Kabelac
2016-01-20 12:54   ` Марк Коренберг
2016-01-20 14:20     ` Zdenek Kabelac
2016-01-20 13:02   ` Alexander E. Patrakov
2016-01-20 13:11     ` Zdenek Kabelac

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