[pve-devel] update disk config, always rescan all the storage, can we avoid that ?

Alexandre DERUMIER aderumier at odiso.com
Mon Jun 3 13:11:52 CEST 2013


>>Yes. But otherwise $settings does not contain drives, so calling creat_disks shoukd have no effect? 

$settings in never empty, as we update the full disk config.

example, to update bandwith limit:

qm update --virtio0 local:1/vm-1-disk-1,cache=none,size=10G,mbps_rd=10

to create_disk is called with

 &$create_disks($rpcenv, $authuser, $conf, $storecfg, $vmid, undef, {$opt => $value});

and $opt=>$value is a valid drive

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

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Alexandre DERUMIER" <aderumier at odiso.com> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Lundi 3 Juin 2013 11:43:13 
Objet: RE: [pve-devel] update disk config, always rescan all the storage, can we avoid that ? 

> >>AFAIK we only call that if someone want to add an existing volid. In 
> >>that case we need to activate the volid, and check if the volume really 
> exists. 
> >> 
> >>What do you want to avoid exactly? 
> 
> Avoid to call create_disks if we update an existing disk. 
> 
> If I understand, the only case we need to call it, is if we update an existing 
> disk by a different disk, or reassign an unused disk ? 

Yes. But otherwise $settings does not contain drives, so calling creat_disks shoukd have no effect? 


More information about the pve-devel mailing list