[pve-devel] [PATCH qemu-server v2 3/6] migration: fail when aliased volume is detected

Fiona Ebner f.ebner at proxmox.com
Mon May 22 16:17:50 CEST 2023


Am 12.05.23 um 14:40 schrieb Aaron Lauterer:
> Aliased volumes (referencing the same disk image multiple times) can
> lead to unexpected behavior in a migration.

Not only migration, but snapshots, storage locking, etc. Should we
actually care here? I still think it is rather something that people
should be made aware for the storage layer. Maybe a big enough warning
in the documentation is enough?

Since it's not only migration, should we add a warning during VM startup
instead/additionally?

> @@ -443,6 +445,12 @@ sub scan_local_volumes {
>  	    }
>          });
>  
> +	for my $path (keys %$path_to_volid) {
> +	    my @volids = keys %{$path_to_volid->{$path}};
> +	    die "detected not supported aliased volumes: '" . join("', '", @volids) . "'"
> +		if (scalar @volids > 1);

Style nit: please use parentheses for scalar

> +	}
> +
>  	foreach my $vol (sort keys %$local_volumes) {
>  	    my $type = $replicatable_volumes->{$vol} ? 'local, replicated' : 'local';
>  	    my $ref = $local_volumes->{$vol}->{ref};





More information about the pve-devel mailing list