LVM and chain of snapshots

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux