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

Dietmar Maurer dietmar at proxmox.com
Wed Jun 5 06:55:00 CEST 2013


> Also, I was thinking to replace
> 
> "
> PVE::Storage::foreach_volid($dl, sub {
>              my ($volumeid) = @_;
>              if($volumeid eq $volid) {
>                      $foundvolid = 1;
>                      return;
>              }
> });
> die "image '$path' does not exists\n" if (!(-f $path || -b $path ||
> $foundvolid)); "
> 
> By a specific storage plugin sub, like volume_exist.
> 
> - Nexenta,netapp for example, have api to check directly if the volume exist
> without need to parse all volumes. (listing all volumes take more time for
> theses storage) This way, we could use the best/fastest method for each
> storage plugin.
> 
> What do you think about it ?

Not sure about that.

First, I though a call to  activate_volume() should 'die' if a volume does not exists? But the nexenta
plugin simply 'return 1'

Second, we have volume_size_info() - should that raise an exeption  if the volume does not exists?



More information about the pve-devel mailing list