[pve-devel] applied: [PATCH storage] fix #2309: allow LVM Volume Group names starting with a digit

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Nov 26 14:17:36 CET 2019


Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 PVE/Storage/Plugin.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Plugin.pm
index a573959..283eafc 100644
--- a/PVE/Storage/Plugin.pm
+++ b/PVE/Storage/Plugin.pm
@@ -145,7 +145,7 @@ PVE::JSONSchema::register_format('pve-storage-vgname', \&parse_lvm_name);
 sub parse_lvm_name {
     my ($name, $noerr) = @_;
 
-    if ($name !~ m/^[a-z][a-z0-9\-\_\.]*[a-z0-9]$/i) {
+    if ($name !~ m/^[a-z0-9][a-z0-9\-\_\.]*[a-z0-9]$/i) {
 	return undef if $noerr;
 	die "lvm name '$name' contains illegal characters\n";
     }
-- 
2.20.1





More information about the pve-devel mailing list