[pve-devel] [PATCH v2 container] fix #2598: activate volumes before mounting in stop mode backup

Aaron Lauterer a.lauterer at proxmox.com
Wed Feb 19 16:33:26 CET 2020


tested it on thick LVM, thin LVM, ZFS and directory storage, backups 
went through fine.

Tested-by: Aaron Lauterer <a.lauterer at proxmox.com>

On 2/18/20 2:38 PM, Oguz Bektas wrote:
> 'stop' mode deactivates the volumes (relevant for LVM backend), and
> they're not reactivated before trying to mount them for backup.
> 
> reactivating the volumes before the mount in 'stop' mode backup solves
> the issue.
> 
> Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
> ---
>   src/PVE/VZDump/LXC.pm | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/src/PVE/VZDump/LXC.pm b/src/PVE/VZDump/LXC.pm
> index 0260184..ed6daa2 100644
> --- a/src/PVE/VZDump/LXC.pm
> +++ b/src/PVE/VZDump/LXC.pm
> @@ -310,6 +310,7 @@ sub archive {
>       if ($task->{mode} eq 'stop') {
>   	my $rootdir = $default_mount_point;
>   	my $storage_cfg = $self->{storecfg};
> +	PVE::Storage::activate_volumes($storage_cfg, $task->{volids});
>   	foreach my $disk (@$disks) {
>   	    $disk->{dir} = "${rootdir}$disk->{mp}";
>   	    PVE::LXC::mountpoint_mount($disk, $rootdir, $storage_cfg, undef, $task->{rootuid}, $task->{rootgid});
> 




More information about the pve-devel mailing list