[pve-devel] GlusterFS transport option

Stoyan Marinov stoyan at marinov.us
Thu Oct 16 17:15:43 CEST 2014


Should be something like this (not a git master):
---
 PVE/Storage/GlusterfsPlugin.pm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/PVE/Storage/GlusterfsPlugin.pm b/PVE/Storage/GlusterfsPlugin.pm
index ee70603..a6f4024 100644
--- a/PVE/Storage/GlusterfsPlugin.pm
+++ b/PVE/Storage/GlusterfsPlugin.pm
@@ -126,6 +126,10 @@ sub properties {
            type => 'string', format => 'pve-storage-server',
            requires => 'server',
        },
+       transport => {
+           description => "Gluster transport: tcp or rdma",
+           type => 'string',
+       },
     };
 }
 
@@ -135,6 +139,7 @@ sub options {
        server => { optional => 1 },
        server2 => { optional => 1 },
        volume => { fixed => 1 },
+       transport => { optional => 1 },
         nodes => { optional => 1 },
        disable => { optional => 1 },
         maxfiles => { optional => 1 },
@@ -194,8 +199,14 @@ sub path {
 
        my $server = &$get_active_server($scfg, 1);
        my $glustervolume = $scfg->{volume};
+       my $transport = $scfg->{transport};
+       my $protocol = "gluster";
+
+       if ($transport) {
+           $protocol = "gluster+$transport";
+       }
 
-       $path = "gluster://$server/$glustervolume/images/$vmid/$name";
+       $path = "$protocol://$server/$glustervolume/images/$vmid/$name";
 
     } else {
        my $dir = $class->get_subdir($scfg, $vtype);
-- 
1.7.12.4 (Apple Git-37)

On Oct 16, 2014, at 5:50 PM, Dietmar Maurer <dietmar at proxmox.com> wrote:

>> I was thinking of (actually implemented it on my servers) adding a "transport"
>> option to storage.cfg. In my implementation transport is optional and if not
>> specified defaults to the current behaviour. Possible values are tcp, rdma or unix
>> (haven't tested the latter though).
>> 
>> So my question is are you (Proxmox) guys interested in implementing this
>> feature? I gotta clean up my patch a bit, as currently it's not against git version.
> 
> I have not seen the patch, so it's hard to say. But in general I am interested in improvements ;-)
> 
> Also read: http://pve.proxmox.com/wiki/Developer_Documentation
> 
> Note: we need a "contributor license agreement" if you want that we include your code.
> 
> 
> 
> 




More information about the pve-devel mailing list