From: Mikulas Patocka <mpatocka@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] ANNOUNCE: an experimental implementation of snapshot merging
Date: Thu, 5 Jun 2008 11:09:11 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0806051102370.19487@engineering.redhat.com> (raw)
In-Reply-To: <1212588457.29076.252.camel@pc.ilinx>
On Wed, 4 Jun 2008, Brian J. Murrell wrote:
> On Wed, 2008-06-04 at 07:07 -0400, Mikulas Patocka wrote:
>>
>>> A pedantic example would be to create an origin, O1 and then a snapshot
>>> of O1 called S1. Make a bunch of changes to S1 and then create another
>>> snapshot of O1 called S2 and then block copy from S1 to S2 (presumably,
>>> although I don't know for sure, S2 only contains the same changed blocks
>>> as S1).
>>
>> No, if you block copy over /dev/vg/snapshot device, it will contain all
>> the blocks (regardless if they differ from the origin or not).
>
> So my premise of copying from S1 to S2 and the result that S2 would only
> contain real blocks for what differs to the origin and pointers for
> blocks that don't differ is false?
Yes, it's false.
If you overwrite a snapshot, you always allocate new exceptions of the
written blocks --- regardless if the blocks differ from the origin or not.
>> There could theoretically be compare function, testing if the write equals
>> to actual data and dropping the write eventually --- but it would be too
>> much coding overhead for too little practical advantage.
>
> For certain use cases I think this would be a great advantage. Think
> about this:
>
> 1. Create an LV and install a linux distro into it.
> 2. Make a snapshot and customize to the settings for a given
> configuration (i.e. a group of hosts)
> 3. Now I want to make an (initially) identical (to the snapshot
> customized in step 2) snapshot for each node in that
> configuration
>
> Being able to do:
>
> # lvcreate -L5G -n pristine node_group
> [ install linux distro into /dev/node_group/pristine ]
> # lvcreate -s -L$size -n config1_master pristine
> # for node in $nodelist; do
>> lvcreate -s -L$size -n $node pristine
>> dd if=/dev/node_group/config1_master of=/dev/node_group/$node
>> done
>
> And have each of those snapshots be as efficient as config1_master.
You can do this if you copy the exception store (i.e. don't copy
/dev/vg/snap or /dev/mapper/vg-snap --- instead, copy
/dev/mapper/vg-snap-cow). Copy it to a new linear logical volume and then
use lvconvert -s to turn it into a snapshot. When you copy
/dev/mapper/vg-snap-cow, the snapshot and origin must be idle ---
otherwise you'd be copying data while it's being modified.
Mikulas
next prev parent reply other threads:[~2008-06-05 15:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-03 19:26 [linux-lvm] ANNOUNCE: an experimental implementation of snapshot merging Mikulas Patocka
2008-06-03 20:32 ` Brian J. Murrell
2008-06-04 11:07 ` Mikulas Patocka
2008-06-04 14:07 ` Brian J. Murrell
2008-06-05 15:09 ` Mikulas Patocka [this message]
2008-06-03 20:43 ` Chris Cox
2008-06-03 20:51 ` Stuart D. Gathman
2008-06-03 23:38 ` Brian J. Murrell
2008-06-04 0:05 ` Chris Cox
2008-06-04 0:20 ` Greg Freemyer
2008-06-04 2:57 ` Brian J. Murrell
2008-06-04 3:23 ` Stuart D. Gathman
2008-06-04 11:11 ` Mikulas Patocka
2008-06-04 10:56 ` Mikulas Patocka
2008-06-04 14:01 ` Steeve McCauley
2008-06-05 15:01 ` Mikulas Patocka
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=Pine.LNX.4.64.0806051102370.19487@engineering.redhat.com \
--to=mpatocka@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