[pve-devel] [PATCH] implement vdisk_clone and vdisk_create_base

Alexandre DERUMIER aderumier at odiso.com
Thu Jan 31 08:57:34 CET 2013


>> Example volume names: 
>>> 
>>> local:6000/base-6000-disk-9.raw 
>>> local:6000/base-6000-disk-9.raw/7000/vm-7000-disk-9.qcow2 
>>> local:6000/base-6000-disk-9.raw/7000/base-7000-disk-10.qcow2 

>>That way it is easy to check if a volume is a clone or a template. Do you think 
>>this can be implemented for all storage types? 

Any changes since what we discuss monday ? This is like this I have impletemed it.

for file :  local:6000/base-6000-disk-9.raw/7000/vm-7000-disk-9.qcow2 
for rbd,sheepdog,... : rbd:base-6000-disk-9/vm-7000-disk-9

Note that currently, I assume that if volume is a base volume and that storage need a snapshot to clone, the snapshot name is always @base. (I create this snapshot when I create the base volume)

But maybe a 

rbd:base-6000-disk-9 at base/vm-7000-disk-9
is better ? 


Another thing we didn't talk, do you want to keep the full chain of relationship in case of clone of clone of clone...
something like 6000/base-6000-disk-9.raw/7000/vm-7000-disk-9.qcow2/8000/vm-8000-disk-1.qcow2/9000/vm-9000-disk-1.qcow2


>>Note: Clone from internal snapshot does not fit into my picture currently. But I guess 
>>we can add that later. 
By internal snapshot, do you mean "Live snapshot" from a vm ? (vm cloning without creating a template)


>>You patch series is simply too large for me. I need to implement things step by step, 
>>so I though it is best to start to update the storage lib. I will try to commit this functionality 
>>step by step, so that you can adapt you series. 
Yes, I understand (I'm working on this since 2 months, so not easy to dig in it).

Maybe can we implement it for 2 types of storage behaviour
 -for file (no snapshot to clone, only a full volume).    (
 -for a storage which need disk snapshot to clone, like rbd for example. (sheepdog,nexenta,.. is more or less copy/paste)

What do you think ?


I'll test your patch this morning, to see how it's work and I'll send some comments/questions.



----- Mail original ----- 

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Dietmar Maurer" <dietmar at proxmox.com>, pve-devel at pve.proxmox.com 
Envoyé: Mercredi 30 Janvier 2013 13:25:14 
Objet: Re: [pve-devel] [PATCH] implement vdisk_clone and vdisk_create_base 

> Example volume names: 
> 
> local:6000/base-6000-disk-9.raw 
> local:6000/base-6000-disk-9.raw/7000/vm-7000-disk-9.qcow2 
> local:6000/base-6000-disk-9.raw/7000/base-7000-disk-10.qcow2 

That way it is easy to check if a volume is a clone or a template. Do you think 
this can be implemented for all storage types? 

Note: Clone from internal snapshot does not fit into my picture currently. But I guess 
we can add that later. 

You patch series is simply too large for me. I need to implement things step by step, 
so I though it is best to start to update the storage lib. I will try to commit this functionality 
step by step, so that you can adapt you series. 




_______________________________________________ 
pve-devel mailing list 
pve-devel at pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 



More information about the pve-devel mailing list