[pve-devel] PVE::Storage::volume_has_feature
Alexandre DERUMIER
aderumier at odiso.com
Mon May 6 08:13:41 CEST 2013
>>I have found some post on qemu-devel mailing, not recommanding opening twice the file. (1 for qemu-img convert , 1 for online qemu).
http://lists.gnu.org/archive/html/qemu-devel/2010-09/msg01207.html
">
> Will do.
> BTW, my usage case for this patch is online backup the snapshot. That
> means the image is opened with r/w by a running QEMU process, at the
> same time, management tool can backup some snapshots already created
> before on this image. Here management tool can make sure no one take
> snapshot while backup snapshots.
> If I read the QCOW2 code correctly(not easy to read...), no one
> snapshots_offset/nb_snapshots in QCOW2 header, if you don't take a new
> snapshot, so it's OK to copy the snapshot out from the image in my
> usage case, right?
Right, I _think_ this might happen to work, at least with today's code.
Still I discourage having an image opened twice. It's not something that
code changes will take into consideration."
"
----- Mail original -----
De: "Alexandre DERUMIER" <aderumier at odiso.com>
À: "Dietmar Maurer" <dietmar at proxmox.com>
Cc: pve-devel at pve.proxmox.com
Envoyé: Lundi 6 Mai 2013 08:09:30
Objet: Re: [pve-devel] PVE::Storage::volume_has_feature
But Maybe you are right,
I have found some post on qemu-devel mailing, not recommanding opening twice the file. (1 for qemu-img convert , 1 for online qemu).
Maybe it's works, but maybe something bad could happen.
I'll do a patch to handle running parameter.
Another thing we need to handle, it's full clone of a vm which is a qcow2 linked clone.
I think we need to add backing files chain in qemu-img convert parameters.
----- Mail original -----
De: "Alexandre DERUMIER" <aderumier at odiso.com>
À: "Dietmar Maurer" <dietmar at proxmox.com>
Cc: pve-devel at pve.proxmox.com
Envoyé: Lundi 6 Mai 2013 07:52:10
Objet: Re: [pve-devel] PVE::Storage::volume_has_feature
>>I thought it is dangerous to access a qcow2 snapshot while the file is in use?
I'm think it's ok to do it online, I have done (small) tests last month.
It's just read access, I don't think it can break the volume.
But I can do test more extensive test again if you want.
----- Mail original -----
De: "Dietmar Maurer" <dietmar at proxmox.com>
À: "Alexandre DERUMIER" <aderumier at odiso.com>
Cc: pve-devel at pve.proxmox.com
Envoyé: Lundi 6 Mai 2013 06:43:09
Objet: RE: PVE::Storage::volume_has_feature
See my example ('copy' qcow2 snapshot while VM is running).
I thought it is dangerous to access a qcow2 snapshot while the file is in use?
> -----Original Message-----
> From: Alexandre DERUMIER [mailto:aderumier at odiso.com]
> Sent: Montag, 06. Mai 2013 06:41
> To: Dietmar Maurer
> Cc: pve-devel at pve.proxmox.com
> Subject: Re: PVE::Storage::volume_has_feature
>
> Yes, Currently I don't use use it, because I think we can do snapshots,full clone,
> linked cloned online or offline for each storage.
>
> Do you see a storage with a feature available offline and not online by example
> ?
>
> ----- Mail original -----
>
> De: "Dietmar Maurer" <dietmar at proxmox.com>
> À: "Alexandre DERUMIER (aderumier at odiso.com)" <aderumier at odiso.com>
> apsho
> Cc: pve-devel at pve.proxmox.com
> Envoyé: Lundi 6 Mai 2013 06:24:05
> Objet: PVE::Storage::volume_has_feature
>
> That function seems to ignore the 'running'parameter, for example:
>
> --------test code------
> #!/usr/bin/perl -w
>
> use strict;
> use PVE::Storage;
>
> my $volid = "local:200/vm-200-disk-1.qcow2"; my $snapname = "firstboot"; my
> $runnung = 1;
>
> my $storecfg = PVE::Storage::config();
>
> die "got unexpected result" if PVE::Storage::volume_has_feature($storecfg,
> 'copy', $volid, $snapname, 1);;
>
> ----- end test code---------
>
> how can we fix that?
_______________________________________________
pve-devel mailing list
pve-devel at pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
_______________________________________________
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