it can't hurt either, and makes it more uniform with qemu migration

On November 6, 2020 3:30 pm, Fabian Ebner wrote:
> Signed-off-by: Fabian Ebner <f.eb...@proxmox.com>
> ---
> 
> This is probably not worth it, for two reasons:
> 1. only local unused volumes are not already deactivated by the existing code
> 2. if nothing else goes wrong, the volumes migrated with storage_migrate
> will be deleted anyways
> 
>  src/PVE/LXC/Migrate.pm | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/PVE/LXC/Migrate.pm b/src/PVE/LXC/Migrate.pm
> index 94a78c5..7c3536f 100644
> --- a/src/PVE/LXC/Migrate.pm
> +++ b/src/PVE/LXC/Migrate.pm
> @@ -294,6 +294,11 @@ sub phase1 {
>       if (my $err = $@) {
>           die "storage migration for '$volid' to storage '$sid' failed - 
> $err\n";
>       }
> +
> +     eval { PVE::Storage::deactivate_volumes($self->{storecfg}, [$volid]); };
> +     if (my $err = $@) {
> +         $self->log('warn', $err);
> +     }
>      }
>  
>      my $conffile = PVE::LXC::Config->config_file($vmid);
> -- 
> 2.20.1
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to