[pve-devel] [PATCH qemu-server] Fix #1242 : clone_disk : call qga fstrim after clone

Alexandre DERUMIER aderumier at odiso.com
Tue May 29 10:02:45 CEST 2018


>>I would think, the best is to have it in the vmid.conf itself, as maybe there 
>>is one VM where I want to have flat images (eg. DB server) and not for the 
>>rest. 

But I think that if user want flat image, it'll not use the discard option for disk ? 
(so fstrim don't do nothing)


I think we need an explicit option like "do fstrim or not after clone disk", more like if user don't want fstrim overhead
on the storage.



>>Maybe in a fashion like, qga: fstrim=1,guest-exec=..., I guess this 
>>makes extending the guest-agent commands more straight forward too. 

maybe something like qga: clonedisk-fstrim=1, ... ?

(fstrim=1 sound like we always allow fstrim or not )


----- Mail original -----
De: "Alwin Antreich" <a.antreich at proxmox.com>
À: "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Mardi 29 Mai 2018 09:19:39
Objet: Re: [pve-devel] [PATCH qemu-server] Fix #1242 : clone_disk : call qga fstrim after clone

On Mon, May 28, 2018 at 08:49:29PM +0200, Alexandre DERUMIER wrote: 
> >>If I understood it right, then the fstrim is called on every migrate with a 
> >>running guest agent. While, I guess the command is called also if you don't 
> >>have discard in the vm config activated and might only produce a error 
> >>message. 
> 
> It don't produce an error, but indeed, it does nothing in this case. 
> I can add a check for discard option, to avoid the extra qga call. 
If there is a config option (see below) then no extra care would be 
needed here. 

> 
> 
> 
> >>IMHO, it might be good to have a config option that sets if a VM should do a 
> >>fstrim (eg. qga-fstrim: 0/1) on migration. This way users, are actively setting 
> >>it and are knowing that this also has its drawbacks on their systems. 
> 
> maybe can we add it in datacenter.cfg ? or storage.cfg option ? 
> 
I would think, the best is to have it in the vmid.conf itself, as maybe there 
is one VM where I want to have flat images (eg. DB server) and not for the 
rest. 

Maybe in a fashion like, qga: fstrim=1,guest-exec=..., I guess this 
makes extending the guest-agent commands more straight forward too. 


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



More information about the pve-devel mailing list