[pve-devel] [PATCH] [FIX] Fix snapshot logic and enable lvmthin storage type.

Dietmar Maurer dietmar at proxmox.com
Sun Jan 10 11:54:55 CET 2016


> diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
> index 6023334..6bd0d5d 100644
> --- a/src/PVE/LXC.pm
> +++ b/src/PVE/LXC.pm
> @@ -1795,11 +1795,12 @@ sub snapshot_create {
>  	my $rootinfo = parse_ct_mountpoint($conf->{rootfs});
>  	my $volid = $rootinfo->{volume};
>  
> +	PVE::Storage::volume_snapshot($storecfg, $volid, $snapname);
> +
>  	if ($running) {
>  	    PVE::Tools::run_command(['/usr/bin/lxc-unfreeze', '-n', $vmid]);
>  	};
>  
> -	PVE::Storage::volume_snapshot($storecfg, $volid, $snapname);
>  	&$snapshot_commit($vmid, $snapname);
>      };

IMHO this is wrong, because the container can modify the storage
after the snapshot is taken. What is the purpose of this change?




More information about the pve-devel mailing list