]> git.proxmox.com Git - pve-storage.git/commitdiff
rbd : parse_volname : parse base
authorAlexandre Derumier <aderumier@odiso.com>
Tue, 5 Feb 2013 11:55:29 +0000 (12:55 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 14 Feb 2013 07:52:22 +0000 (08:52 +0100)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/Storage/RBDPlugin.pm

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