[pve-devel] GlusterFS transport option

Dietmar Maurer dietmar at proxmox.com
Thu Oct 16 17:52:24 CEST 2014


comments inline

> -----Original Message-----
> From: Stoyan Marinov [mailto:stoyan at marinov.us]
> Sent: Donnerstag, 16. Oktober 2014 17:16
> To: Dietmar Maurer
> Cc: pve-devel at pve.proxmox.com
> Subject: Re: [pve-devel] GlusterFS transport option
> 
> 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',

emum => ['tcp', 'rdma', 'unix'],

> +       },
>      };
>  }
> 
> @@ -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";

looks strange to me. how is "unix://$server/$glustervolume/images/$vmid/$name" related to gluster?

>      } else {
>         my $dir = $class->get_subdir($scfg, $vtype);
> --
> 1.7.12.4 (Apple Git-37)




More information about the pve-devel mailing list