[Discuss] lvm snapshot cloning
markw at mohawksoft.com
markw at mohawksoft.com
Tue Oct 25 19:51:01 EDT 2011
> On Oct 24, 2011, at 10:42 PM, markw at mohawksoft.com wrote:
>>
>> I can't understand your perspective here. We have various RAID drivers,
>> we
>> have linear drivers, sparse volumes, encrypted volumes, and so on. All
>> implemented at the block device level.
>
> Then let me paraphrase it: LVM is a logical partition manager.
No, its a "Logical Volume Manager." Come on, lets be constructive. LVM
snapshots are, in essence, sparsely allocated block devices with a
"master" device acting as the background fill. And Yes, there is COW when
blocks get written in the master or snapshot, but that's about it.
>
>
>> How are snapshots any more or less complex or problematic than a RAID5
>> or
>> encrypted block device?
>
> Practical example: create your "master" volume (partition) with 1TB.
> Create a snapshot of the master, call it "a" and give it 100GB. Create
> another snapshot of the master, call it "b" and give it 1GB. The
> snapshots are created such that a does COW against master and b is mostly
> pointers to volume a's blocks so that you don't have the duplicated
> blocks.
I wish this were true, but from what I've been able to learn is that two
different snapshots will each have their own copies of the COW data.
On other system, yes, master<-b<-a
Where 'a' is older than 'b'
On lvm its more like this:
master
^ ^
a b
Where they equally point to the master. Each snapshot stores its data in
its own cow image. I don't see any provision for multiple snapshots to
share cow data.
>
> Now, delete volume a. Or copy 100GB+1byte to volume a. This will trigger
> LVM's reaper which prunes the snapshot to ensure that there is no data
> loss on master.
The snapshot has no effect on the master, and yes, we've already said and
we already know it is a weakness in LVM that if you don't extend your
snapshots you lose them. This can be mitigated by monitoring and automatic
volume extension.
BTW: Thanks, I have been looking at LVM and these discussions have forced
me to really look closely at it. I'm still not decided, but if I decide it
is the way we want to go, I will owe a lot of the debate to practice on
BLU!
More information about the Discuss
mailing list