* [linux-lvm] multiple levels of snapshots
@ 2007-04-23 18:54 Boris Ostrovsky
2007-04-23 18:58 ` Alasdair G Kergon
0 siblings, 1 reply; 3+ messages in thread
From: Boris Ostrovsky @ 2007-04-23 18:54 UTC (permalink / raw)
To: linux-lvm
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)?
Would it be possible to use dmsetup to set this up? I suspect that the
answer is "no", but
I'd like to make sure before I give up on this.
Thanks.
-boris
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] multiple levels of snapshots
2007-04-23 18:54 Boris Ostrovsky
@ 2007-04-23 18:58 ` Alasdair G Kergon
0 siblings, 0 replies; 3+ messages in thread
From: Alasdair G Kergon @ 2007-04-23 18:58 UTC (permalink / raw)
To: LVM general discussion and development
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.
Alasdair
--
agk@redhat.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] multiple levels of snapshots
@ 2007-04-26 14:00 Boris Ostrovsky
0 siblings, 0 replies; 3+ messages in thread
From: Boris Ostrovsky @ 2007-04-26 14:00 UTC (permalink / raw)
To: linux-lvm
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-04-26 14:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-26 14:00 [linux-lvm] multiple levels of snapshots Boris Ostrovsky
-- strict thread matches above, loose matches on Subject: below --
2007-04-23 18:54 Boris Ostrovsky
2007-04-23 18:58 ` Alasdair G Kergon
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).