[linux-lvm] LVM Snapshots & journal recovery

Peter J. Braam braam at mountainviewdata.com
Wed May 23 14:48:42 UTC 2001


Joe,

Thanks for explaining this.

That's still not good enough, but better: you must also wait for the
redirection table to be stable on disk before you can overwrite the origin
device.

So journal recovery can indeed work if LVM snapshots wait twice:

 - first for the copied disk to become stable on disk
 - then for the redirection to become stable on disk

at that point one can safely over-write the origin.

First, looking at the code, I don't think that this is happening at all.
Second, to have these two extra waits seems really quite a bad penalty to
me.

- Peter -


On Wed, 23 May 2001, Joe Thornber wrote:

> On Tue, May 22, 2001 at 03:32:19PM -0600, Peter J. Braam wrote:
> <snip>
> >
> > But during recovery, LVM cannot possibly know if the whole process of
> > copying out the data from the current to the snapshot area completed
> > during the previous run. Yes, LVM updates the redirection table first and
> > then copies, but, still, you don't know _where exactly_ the writes stopped
> > happening and in particular you don't know if the block was copied already
> > or not.
> >
>
> The snapshot metadata (redirection table) is written *after* the copy.
> Data will not hit the origin device until after the copy on write has
> completed successfully.
>
> - Joe
>

-- 




More information about the linux-lvm mailing list