X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=PVE%2FStorage%2FLvmThinPlugin.pm;h=4ba6f901d89f047157b59ac0c799d1b6e37d7773;hb=d5fc368503fc04fdbc411d0a6dde13fce75ece18;hp=d1c5b1f6c60d3292191be383bfc23303fd4cb63c;hpb=d65590d1be7d6aa5136b7ced8cc28871b7155090;p=pve-storage.git diff --git a/PVE/Storage/LvmThinPlugin.pm b/PVE/Storage/LvmThinPlugin.pm index d1c5b1f..4ba6f90 100644 --- a/PVE/Storage/LvmThinPlugin.pm +++ b/PVE/Storage/LvmThinPlugin.pm @@ -86,7 +86,7 @@ sub alloc_image { die "unsupported format '$fmt'" if $fmt ne 'raw'; - die "illegal name '$name' - sould be 'vm-$vmid-*'\n" + die "illegal name '$name' - should be 'vm-$vmid-*'\n" if $name && $name !~ m/^vm-$vmid-/; my $vgs = PVE::Storage::LVMPlugin::lvm_vgs(); @@ -117,7 +117,7 @@ sub free_image { # remove all volume snapshots first foreach my $lv (keys %$dat) { - next if $lv !~ m/^snap_${volname}_(\w+)$/; + next if $lv !~ m/^snap_${volname}_${PVE::JSONSchema::CONFIGID_RE}$/; my $cmd = ['/sbin/lvremove', '-f', "$vg/$lv"]; run_command($cmd, errmsg => "lvremove snapshot '$vg/$lv' error"); }