[pve-devel] [PATCH 02/44] rbd : parse_volname : parse base
Alexandre Derumier
aderumier at odiso.com
Tue Feb 5 12:55:29 CET 2013
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/Storage/RBDPlugin.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
index a218bcc..2eb55ba 100644
--- a/PVE/Storage/RBDPlugin.pm
+++ b/PVE/Storage/RBDPlugin.pm
@@ -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";
--
1.7.10.4
More information about the pve-devel
mailing list