[pve-devel] [PATCH] vzdump : fix check if volid exist for "virtual" storage : rbd, sheepdog, nexenta

Stefan Priebe s.priebe at profihost.ag
Sat Feb 16 20:16:00 CET 2013


thx you're too fast for me ;-)

Stefan

Am 16.02.2013 18:22, schrieb Alexandre Derumier:
>
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> ---
>   PVE/VZDump/QemuServer.pm |   14 +++++++++++++-
>   1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm
> index ad85cc2..0f2536e 100644
> --- a/PVE/VZDump/QemuServer.pm
> +++ b/PVE/VZDump/QemuServer.pm
> @@ -94,7 +94,19 @@ sub prepare {
>
>   	next if !$path;
>
> -	die "no such volume '$volid'\n" if ! -e $path;
> +	if (! -e $path){
> +	    my $dl = PVE::Storage::vdisk_list($self->{storecfg}, $storeid, undef);
> +	    my $foundvolid = undef;
> +
> +	    PVE::Storage::foreach_volid($dl, sub {
> +		my ($volumeid) = @_;
> +		if($volumeid eq $volid) {
> +		    $foundvolid = 1;
> +		    return;
> +		}
> +	    });
> +	    die "no such volume '$volid'\n" if !$foundvolid;
> +	}
>
>   	my ($size, $format) = PVE::Storage::Plugin::file_size_info($path);
>
>



More information about the pve-devel mailing list