大网数据广告活动
服务器运维问答

How can I bind glusterfsd process to an interface (ip)?

· 52CE 我爱测

I try to bind gluster processes to the internal (lan) interface unsuccessfully. According to the documentation I can bind to IP in /etc/gluster/glusterd.vol # cat /etc/glusterfs/glusterd.vol volume management type mgmt/glusterd o…

问题原文

原帖链接 · goteguru · CC BY-SA 3.0

I try to bind gluster processes to the internal (lan) interface unsuccessfully.

According to the documentation I can bind to IP in /etc/gluster/glusterd.vol

# cat /etc/glusterfs/glusterd.vol 
volume management
    type mgmt/glusterd
    option working-directory /var/lib/glusterd
    option transport-type socket,rdma
    option transport.rdma.bind-address  192.168.1.1
    option transport.socket.bind-address 192.168.1.1
    option transport.socket.keepalive-time 10
    option transport.socket.keepalive-interval 2
    option transport.socket.read-fail-log off
end-volume

So far so good. However, after restarting the services, I see:

# netstat -ltpn | grep gluster
tcp        0      0 0.0.0.0:49154           0.0.0.0:*               LISTEN      32205/glusterfsd
tcp        0      0 192.168.1.1:24007      0.0.0.0:*               LISTEN      32002/glusterd  

Glusterd is OK, but glusterfsd is definitely NOT. I can't find any options which can bind individual shares in gluster volume set ....

How can I restrict that glusterfsd process to 192.168.1.1? I really don't like it's exposed to the World.

已采纳解答

原帖链接 · Christian · CC BY-SA 4.0

Old question, but i stumbled upon the same question yesterday. Maybe it will help someone in the future.

Here is my answer (tested with glusterfs 5.5)

Create in /etc/glusterfs a file named "glusterfsd.vol".

Add the following config for each volume to the file to configure the source ip.

volume <your-volume-name>-server
    type protocol/server
    option transport.socket.bind-address 192.168.1.1
end-volume

If you use local fuse mounts, make sure to use 192.168.1.1 instead of localhost to connect to the volume because the volume is now only reachable over this IP.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-07-22)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。