]> git.proxmox.com Git - pve-storage.git/commitdiff
nexenta : parse_volname
authorAlexandre Derumier <aderumier@odiso.com>
Tue, 5 Feb 2013 11:55:59 +0000 (12:55 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 14 Feb 2013 09:23:44 +0000 (10:23 +0100)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/Storage/NexentaPlugin.pm

index 6f0e2576bc14461dee2e89914912db0a3bd9d75e..4a5f66d4c617999af66b8a396e9c0cf8dad38463 100644 (file)
@@ -180,8 +180,8 @@ sub options {
 sub parse_volname {
     my ($class, $volname) = @_;
 
-    if ($volname =~ m/^(vm-(\d+)-\S+)$/) {
-       return ('images', $1, $2);
+    if ($volname =~ m/^(((base|vm)-(\d+)-\S+)\/)?((base)?(vm)?-(\d+)-\S+)$/) {
+       return ('images', $5, $8, $2, $4, $6);
     }
 
     die "unable to parse nexenta volume name '$volname'\n";