[pve-devel] applied: [PATCH container] copy_volume: get the real volume size

Thomas Lamprecht t.lamprecht at proxmox.com
Mon May 7 16:16:34 CEST 2018


Am 05/07/2018 um 02:52 PM schrieb Wolfgang Bumiller:
> Since we're not supposed to rely on this property being
> there or even correct.
> 
> Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
> ---
>   src/PVE/LXC.pm | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
> index 423ce21..de3c91f 100644
> --- a/src/PVE/LXC.pm
> +++ b/src/PVE/LXC.pm
> @@ -1679,6 +1679,8 @@ sub copy_volume {
>       # (not-mounted) directory.
>       my $new_volid;
>       eval {
> +	# Make sure $mp contains a correct size.
> +	$mp->{size} = PVE::Storage::volume_size_info($storage_cfg, $mp->{volume});
>   	my $needs_chown;
>   	($new_volid, $needs_chown) = alloc_disk($storage_cfg, $vmid, $storage, $mp->{size}/1024, $rootuid, $rootgid);
>   	if ($needs_chown) {
> 

applied, thanks




More information about the pve-devel mailing list