[pve-devel] [PATCH storage 3/3] Fix volume name identification with linked clones

Daniel Berteaud daniel at firewall-services.com
Tue Sep 17 12:44:04 CEST 2019


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





More information about the pve-devel mailing list