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

Alexandre DERUMIER aderumier at odiso.com
Thu May 30 14:49:25 CEST 2013


Hi,

I notice some delay when updating a disk config (setting io limit for example),

in Qemu.pm,

$vmconfig_update_disk

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

which do :
"
            if ($storeid) {
                PVE::Storage::activate_volumes($storecfg, [ $volid ]);
                my $dl = PVE::Storage::vdisk_list($storecfg, $storeid, undef);

                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));

"


I don't remember exactly in which case we are doing it, but maybe can we avoid that for some values updates ?


(this is because my netapp and nexenta storage take some seconds to list alls disks)



More information about the pve-devel mailing list