linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Snapshot - Commit and Rollback
@ 2008-01-04  6:01 Rahul Sahadevan
  2008-01-18 10:37 ` [linux-lvm] " Rahul Sahadevan
  0 siblings, 1 reply; 3+ messages in thread
From: Rahul Sahadevan @ 2008-01-04  6:01 UTC (permalink / raw)
  To: linux-lvm; +Cc: rahul

Group,
     I am using LVM2 for my volume management and its working very fine.
Last day i try to take backup of the volumes using snapshot feature
available. I have following queries regarding the snapshot working.
After the snapshot is taken is there any way to update the contents
(COMMIT) of the same snapshot with the changed contents in the share in
a future point of time. 
Also is there any feature like ROLLBACK to revert back the volume
content with the contents of the nth snapshot. 
As per now i have to store multiple snapshots for every changes
happening in the volume, which is almost like wasting a hell lot of
space. 
If anyone put light on these and let me know where to refer to get more
details on this will be highly appreciable.

Thanks in advance. 

regards,
     Rahul

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

* [linux-lvm] Re: Snapshot - Commit and Rollback
  2008-01-04  6:01 [linux-lvm] Snapshot - Commit and Rollback Rahul Sahadevan
@ 2008-01-18 10:37 ` Rahul Sahadevan
  2008-01-18 16:53   ` Stuart D. Gathman
  0 siblings, 1 reply; 3+ messages in thread
From: Rahul Sahadevan @ 2008-01-18 10:37 UTC (permalink / raw)
  To: linux-lvm

Hi Group,
     I have posted this mail regarding the SNAPSHOT operations in LVM2.
If anyone has any clue or comments please put forward. I am deliberately
waiting for a reply from this group. 

regards,
    Rahul

On Fri, 2008-01-04 at 11:31 +0530, Rahul Sahadevan wrote:
> Group,
>      I am using LVM2 for my volume management and its working very fine.
> Last day i try to take backup of the volumes using snapshot feature
> available. I have following queries regarding the snapshot working.
> After the snapshot is taken is there any way to update the contents
> (COMMIT) of the same snapshot with the changed contents in the share in
> a future point of time. 
> Also is there any feature like ROLLBACK to revert back the volume
> content with the contents of the nth snapshot. 
> As per now i have to store multiple snapshots for every changes
> happening in the volume, which is almost like wasting a hell lot of
> space. 
> If anyone put light on these and let me know where to refer to get more
> details on this will be highly appreciable.
> 
> Thanks in advance. 
> 
> regards,
>      Rahul

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

* Re: [linux-lvm] Re: Snapshot - Commit and Rollback
  2008-01-18 10:37 ` [linux-lvm] " Rahul Sahadevan
@ 2008-01-18 16:53   ` Stuart D. Gathman
  0 siblings, 0 replies; 3+ messages in thread
From: Stuart D. Gathman @ 2008-01-18 16:53 UTC (permalink / raw)
  To: LVM general discussion and development

On Fri, 18 Jan 2008, Rahul Sahadevan wrote:

>      I have posted this mail regarding the SNAPSHOT operations in LVM2.
> If anyone has any clue or comments please put forward. I am deliberately
> waiting for a reply from this group. 

COMMIT and ROLLBACK features are not currently implemented.  They are
certainly possible using device-mapper.

Here is an idea about ROLLBACK.  Assume a primary LV 'P' and a snapshot
'S'.  Any writes to 'P' copies the cluster to 'S' first.  Any reads
from 'S' get the data from 'P' unless it was copied to 'S'.

Now, for a rollback, create a new snapshot 'R' (in case we change our
minds!).  In addition, reads from 'P' fetch clusters from 'S' that were
copied there, until that cluster is written on 'P'.  'P' now depends on 'S'.

To eventually get rid of 'S', we also have reads from 'P' that are mapped
to 'S' also copy the cluster from 'S' back to 'P' (after copying from 'P'
to 'R' of course).  So simply by reading all of 'P', the clusters mapped
to 'S' (the percentage displayed in lvs) can be reduced to 0, and 'S' can then
be deleted.  

This works even if 'S' is rw, but isn't a true rollback, of course, unless 'S'
is ro.  If 'S' is rw, we can call the above operation a 'COMMIT', and if we
change our minds and revert to 'R', *that* is the 'ROLLBACK'.

-- 
	      Stuart D. Gathman <stuart@bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

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

end of thread, other threads:[~2008-01-18 16:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-04  6:01 [linux-lvm] Snapshot - Commit and Rollback Rahul Sahadevan
2008-01-18 10:37 ` [linux-lvm] " Rahul Sahadevan
2008-01-18 16:53   ` 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).