[pve-devel] [PATCH] rbd plugin : return /dev/rbX path for krbd
Alexandre Derumier
aderumier at odiso.com
Sun Aug 16 19:45:03 CEST 2015
lxc need /dev/.. path
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/Storage/RBDPlugin.pm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
index 9dcf420..66b2dd1 100644
--- a/PVE/Storage/RBDPlugin.pm
+++ b/PVE/Storage/RBDPlugin.pm
@@ -271,7 +271,13 @@ sub path {
$path .= ":auth_supported=none";
}
- $path = "/dev/rbd/$pool/$name" if $scfg->{krbd};
+ if($scfg->{krbd}) {
+ $path = "/dev/rbd/$pool/$name";
+ if(-e $path) {
+ $path = readlink($path);
+ $path =~ s/\.\.\/\.\.\//\/dev\//;
+ }
+ }
return ($path, $vmid, $vtype);
}
--
2.1.4
More information about the pve-devel
mailing list