From: "Boris Ostrovsky" <baostr@gmail.com>
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] multiple levels of snapshots
Date: Thu, 26 Apr 2007 10:00:08 -0400 [thread overview]
Message-ID: <fd8dc0d20704260700l76ae6476k13c1e5dfac8b24f3@mail.gmail.com> (raw)
At Alasdair suggestion, I am posting to the list steps that I executed
to make this work,
in case someone else is interested in doing something like this as well.
Here is the hierarchy that I was trying to create:
base
|
child1
/ \
child2.1 child2.2
|
child3
I used 1GB volume for base and gave 1GB to each COW volume (you can give less
than that if you don't expect too many dirty writes):
# lvcreate -L 1G -n base vg
# lvcreate -L 1G -n cow1 vg
# lvcreate -L 1G -n cow2.1 vg
# lvcreate -L 1G -n cow2.2 vg
# lvcreate -L 1G -n cow3 vg
# echo 0 $(blockdev --getsize /dev/mapper/vg-base) snapshot \
/dev/mapper/vg-base /dev/mapper/vg-cow1 p 8 | dmsetup create vg-child1
# echo 0 $(blockdev --getsize /dev/mapper/vg-child1) snapshot \
/dev/mapper/vg-child1 /dev/mapper/vg-cow2.1 p 8 | dmsetup create vg-child2.1
# echo 0 $(blockdev --getsize /dev/mapper/vg-child1) snapshot \
/dev/mapper/vg-child1 /dev/mapper/vg-cow2.2 p 8 | dmsetup create vg-child2.2
# echo 0 $(blockdev --getsize /dev/mapper/vg-child1) snapshot \
/dev/mapper/vg-child2.2 /dev/mapper/vg-cow3 p 8 | dmsetup create vg-child3
If you now mount /dev/mapper/vg-child2.1, you will see contents of
base and child1.
Mounting /dev/mapper/vg-child3 will additionally provide you with contents of
child2.2.
-boris
Alasdair G Kergon wrote:
>
> On Mon, Apr 23, 2007 at 02:54:37PM -0400, Boris Ostrovsky wrote:
> > From what I can see, LVM tools don't allow creating multiple levels of
> > snapshots (i.e. creating a
> > snapshot of a snapshot). Is this a fundamental property of LVM/device
> > mapper architecture
> > or is it that this feature simply hasn't made it to LVM (yet)?
>
> You could indeed set it up outside LVM using dmsetup.
next reply other threads:[~2007-04-26 14:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-26 14:00 Boris Ostrovsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-04-23 18:54 [linux-lvm] multiple levels of snapshots Boris Ostrovsky
2007-04-23 18:58 ` Alasdair G Kergon
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=fd8dc0d20704260700l76ae6476k13c1e5dfac8b24f3@mail.gmail.com \
--to=baostr@gmail.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).