From: Mike Snitzer <snitzer@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: [linux-lvm] Re: Snapshots
Date: Fri, 11 Sep 2009 09:44:02 -0400 [thread overview]
Message-ID: <20090911134402.GA10146@redhat.com> (raw)
In-Reply-To: <20090910152510.20691nc1e7608sm8@www.destar.net>
On Thu, Sep 10 2009 at 7:25pm -0400,
jonr@destar.net <jonr@destar.net> wrote:
> Hello List,
>
> I don't get it!
The snapshot diagrams from Alasdair's old FOSDEM slides should help you
visualize the kernel layers involved beneath LVM (e.g. dm-snapshot):
http://people.redhat.com/agk/talks/FOSDEM_2005/
Starting with the "Snapshot" slide through "Two Snapshots". Without
having text associated with each slide it may be too terse for you
but I recommend having a look...
> 1. How can I have a 20GB LV as a disk and the snapshot be 10GB and boot
> the entire OS?
The snapshot LV is backed by the "COW" in the diagrams above. If you
wanted to accommodate _every_ block changing in the origin LV (copied out
to the snapshot LV) you'd have to size the snapshot LV to be a bit
larger than the origin LV (snapshot metadata has some small overhead).
Sizing your snapshot LV is all about how you intend to use the
snapshot. E.g. what is the expected rate of change to the origin LV
while you intend to have the snapshot active? If you'll be changing the
origin extensively then you want to use a larger snapshot LV.
> 2. Can I create a DomU and then snapshot the LV and use the snapshot to
> create other DomU's?
Sure, but I'd imagine you'd have to change some unique identifiers in
the DomU so that it can co-exist with the original. These changes would
get written through the "snapshot" layer in the kernel and directly out
to the COW (would never touch the origin LV; not to be confused with
"origin" layer :).
> 3. If 2 is yes, would I want to continue using the snapshot as the disk
> or is there something else that should be done, i.e. dd the drive to a
> new LV?
Depends how permanent you need the new DomU to be. And how much
simultaneous change you expect to the original DomU.
The emerging "multi-snapshot" implementation that Mikulas Patocka is
actively working on is really geared toward this Xen DomU snapshot
use-case. Mikulas has posted his patches to dm-devel but it'll be a bit
longer before they are all merged into an upstream Linux kernel.
Mike
next prev parent reply other threads:[~2009-09-11 13:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-10 23:25 [linux-lvm] Snapshots jonr
2009-09-11 9:14 ` Peter Keller
2009-09-11 13:39 ` André Gillibert
2009-09-11 13:44 ` Mike Snitzer [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-09-17 14:24 Jon Hardcastle
2009-09-17 14:32 ` [linux-lvm] Snapshots Mike Snitzer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090911134402.GA10146@redhat.com \
--to=snitzer@redhat.com \
--cc=linux-lvm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).