[pve-devel] [PATCH storage 3/3] Fix volume name identification with linked clones
Daniel Berteaud
daniel at firewall-services.com
Wed Sep 18 10:40:25 CEST 2019
----- Le 17 Sep 19, à 12:44, Daniel Berteaud daniel at firewall-services.com a écrit :
> Linked clones has an image like base-100-disk-0/vm-101-disk-0
> The previous regex didn't catched it, and thus, resizing a linked clone
> failed
> ---
> PVE/Storage/LunCmd/LIO.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/PVE/Storage/LunCmd/LIO.pm b/PVE/Storage/LunCmd/LIO.pm
> index f246dbb..f2f8944 100644
> --- a/PVE/Storage/LunCmd/LIO.pm
> +++ b/PVE/Storage/LunCmd/LIO.pm
> @@ -192,7 +192,7 @@ my $extract_volname = sub {
> my $volname = undef;
>
> my $base = get_base;
> - if ($lunpath =~ /^$base\/$scfg->{pool}\/([\w\-]+)$/) {
> + if ($lunpath =~ /((?:base|vm)\-\d+\-disk\-\d+)$/) {
> $volname = $1;
> }
>
> --
> 2.21.0
Just realized this one won't work for state volume (associated with snapshots). Will try to rewrok it ASAP
--
[ https://www.firewall-services.com/ ]
Daniel Berteaud
FIREWALL-SERVICES SAS, La sécurité des réseaux
Société de Services en Logiciels Libres
Tél : +33.5 56 64 15 32
Matrix: @dani:fws.fr
[ https://www.firewall-services.com/ | https://www.firewall-services.com ]
More information about the pve-devel
mailing list