5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-08-29 17:49:22 +03:00

vzdump : check if volid exist with volume_size_info

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier
2013-02-17 11:01:39 +01:00
committed by Dietmar Maurer
parent a6f0e83b93
commit daca220d29

View File

@ -94,9 +94,13 @@ sub prepare {
next if !$path;
die "no such volume '$volid'\n" if ! -e $path;
my $format = undef;
my $size = undef;
my ($size, $format) = PVE::Storage::Plugin::file_size_info($path);
eval{
($size, $format) = PVE::Storage::volume_size_info($self->{storecfg}, $volid, 5);
};
die "no such volume '$volid'\n" if $@;
my $diskinfo = { path => $path , volid => $volid, storeid => $storeid,
format => $format, virtdev => $ds, qmdevice => "drive-$ds" };