On June 9, 2021 3:18 pm, Wolfgang Bumiller wrote:
> Signed-off-by: Wolfgang Bumiller <[email protected]>
> ---
>  PVE/QemuMigrate.pm | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
> index 6375a15..5b07c20 100644
> --- a/PVE/QemuMigrate.pm
> +++ b/PVE/QemuMigrate.pm
> @@ -502,7 +502,10 @@ sub scan_local_volumes {
>               # exceptions: 'zfspool' or 'qcow2' files (on directory storage)
>  
>               die "online storage migration not possible if snapshot 
> exists\n" if $self->{running};
> -             if (!($scfg->{type} eq 'zfspool' || 
> $local_volumes->{$volid}->{format} eq 'qcow2')) {
> +             if (!($scfg->{type} eq 'zfspool'
> +                 || ($scfg->{type} eq 'btrfs' && 
> $local_volumes->{$volid}->{format} eq 'raw')
> +                 || $local_volumes->{$volid}->{format} eq 'qcow2'
> +             )) {
>                   die "non-migratable snapshot exists\n";
>               }
>           }
> @@ -553,7 +556,7 @@ sub scan_local_volumes {
>           my ($sid, $volname) = PVE::Storage::parse_volume_id($volid);
>           my $scfg =  PVE::Storage::storage_config($storecfg, $sid);
>  
> -         my $migratable = $scfg->{type} =~ /^(?:dir|zfspool|lvmthin|lvm)$/;
> +         my $migratable = $scfg->{type} =~ 
> /^(?:dir|btrfs|zfspool|lvmthin|lvm)$/;

also stumbled upon this when doing the remote migrate stuff - AFAICT, 
this is basically a leftover thing from when migration was more limited. 
atm this is basically every built-in storage type that is not shared 
(and for remote migration, we'd add most shared storage types as well).

I'd either drop it altogether, or move it to the storage plugin 
definition (possible two booleans - one for NBD-based qemu migration, 
one for storage migration?).

>  
>           die "can't migrate '$volid' - storage type '$scfg->{type}' not 
> supported\n"
>               if !$migratable;
> -- 
> 2.30.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> [email protected]
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 


_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to