[linux-lvm] Examining a snapshot
Bill Rugolsky Jr.
brugolsky at telemetry-investments.com
Wed Sep 27 13:47:22 UTC 2006
On Wed, Sep 27, 2006 at 02:57:16PM +1200, Nick Wright wrote:
> Hi all,
> I have a backup strategy in place where I use snapshots to determine
> the difference between yesterday and today. I then copy those blocks
> that have changed to a target machine and apply the difference to a
> remote copy of the entire block device.
> Currently this involves doing a complete comparison between a logical
> volume and its snapshot to find the blocks that have changed. I know
> that internally, LVM already has the information about which blocks
> have been altered -- these are what are stored in the snapshot after
> Is it possible for me to get that information somehow? Some pointers
> getting me started on this would be of great help to me -- especially
> if theres a simple way to do so already in place before I go delving
> into source code etc...
Have a look at:
There are patches from Mark McLoughlin, not yet upstream, AFAIK, that
allow a snapshot LV to be merged back into the origin using "lvmerge."
The other piece provided by the Stateless packages copies the snapshot
backing store to another host and sets up the dm mappings so that the
relationship on the remote machine is similar to the relationship on
the local host.
It would be nice to see this all merged upstream some time soon.
A while ago I proposed a lightweight target that wouldn't copy the
data, but would only record the blocks that were changed, which
is precisely what you want:
Unfortunately, I've had no time to attempt implementing it, though
it should be straightforward.
More information about the linux-lvm