Fix #643: activate volumes before resizing

The volume_size_info() call was what actually failed, but
the error reported to the gui came from afterwards trying to
resize the disk to a garabge size.
This commit is contained in:
Wolfgang Bumiller 2016-04-13 15:59:43 +02:00 committed by Dietmar Maurer
parent 681e12ba37
commit b572a6065a

View File

@ -2745,6 +2745,7 @@ __PACKAGE__->register_method({
$rpcenv->check($authuser, "/storage/$storeid", ['Datastore.AllocateSpace']);
PVE::Storage::activate_volumes($storecfg, [$volid]);
my $size = PVE::Storage::volume_size_info($storecfg, $volid, 5);
die "internal error" if $sizestr !~ m/^(\+)?(\d+(\.\d+)?)([KMGT])?$/;