[pve-devel] update disk config, always rescan all the storage,	can we avoid that ?
    Alexandre DERUMIER 
    aderumier at odiso.com
       
    Wed Jun  5 07:46:07 CEST 2013
    
    
  
>>The following should also work:
>>
>>  $size = PVE::Storage::volume_size_info($storecfg, $volid, 1);
>>And is a timeout of 1 second enough? 
I think is enough, I never had problem with 1s. But I'll retry with differents storage to be sure.
----- Mail original ----- 
De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Alexandre DERUMIER" <aderumier at odiso.com> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Mercredi 5 Juin 2013 07:35:34 
Objet: RE: [pve-devel] update disk config, always rescan all the storage, can we avoid that ? 
> This should do the job: 
> 
> my $size = undef; 
> 
> eval{ 
> 
> ($size) = PVE::Storage::volume_size_info($storecfg, $volid, 1); 
The following should also work: 
$size = PVE::Storage::volume_size_info($storecfg, $volid, 1); 
And is a timeout of 1 second enough? 
> }; 
> die "voluem does not exits" if $@;; 
> 
> I can rebase my patch if you want 
please do. 
    
    
More information about the pve-devel
mailing list