免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4728 | 回复: 5
打印 上一主题 下一主题

[GlusterFS] GlusterFS:几个server不能同时挂载到client?? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-07-11 17:46 |只看该作者 |倒序浏览
GlusterFS的配置问题

只是做个简单的实验,把四台机子利用glusterfs组成一个简单的集群系统。
OS: CentOS 5.3 (2.6.18-128.1.16.el5)
GlusterFS: glusterfs-2.0.3
FUSE:       fuse-2.7.4
--------------------------
client  : 192.168.1.10
server 1: 192.168.1.11 (注:虚拟机)
server 2: 192.168.1.12 (注:虚拟机)
server 3: 192.168.1.13 (注:虚拟机)

以下为server端和client端的配置文件:

-----------server: glusterfsd.vol------------
volume brick
  type storage/posix                   # POSIX FS translator
  option directory /home/gfs-data        # Export this directory
end-volume

volume server
  type protocol/server
  option transport-type tcp
  subvolumes brick
  option auth.addr.brick.allow * # Allow access to "brick" volume
end-volume

-----------client:glusterfs.vol -------------
## client feature and attach to remote subvolume
volume client1
        type protocol/client
        option        transport-type        tcp
        option        remote-host        192.168.1.11
        option remote-subvolume brick
end-volume

volume client2
        type protocol/client
        option transport-type tcp
        option remote-host 192.169.1.12
        option remote-subvolume brick
end-volume

volume client3
        type protocol/client
        option transport-type tcp
        option remote-host 192.169.1.13
        option remote-subvolume brick
end-volume

volume bricks
        type cluster/replicate
        subvolumes client1 client2 client3
end-volume

--------------------------------
配置完成后三个server均能正常运行。

但运行#glusterfs -f /etc/glusterfs/glusterfs.vol  /mnt/glusterfs后,虽然df -hT能看到挂在的glusterfs文件系统,倒是日志内容显示仅server 1和client成功连接,且在server 1日志内容中也有成功连接到client的信息。client的日志中没有server 2和3的相关连接信息,server 2和3的日志中也没有相关的连接信息。

同时在client端的export目录下写入数据时有时会出现“函数未实现”字样 (Function not implemented)
后来又尝试了一下,仅仅使用client和单个server,挂载成功,并且向client或server端的export目录下更新能容时在另一端数据同步正常。


原本的目标是:把四台机子用glusterfs组成一个集群,然后在client或各个server的任何一处作改动时,其他任何一处都能同步数据。

不过现在问问重重,还是新手,不知道如何是好……

论坛徽章:
0
2 [报告]
发表于 2009-07-12 16:05 |只看该作者
any guy here ?

论坛徽章:
0
3 [报告]
发表于 2009-07-13 15:38 |只看该作者

回复 #1 Kallawa 的帖子

配置文件看不出什么问题

论坛徽章:
0
4 [报告]
发表于 2009-07-13 18:10 |只看该作者
修改了sever和client的volume file了之后,现在三个server能挂到client上了(从server和client各个日志内容来看,均能成功连接),但是出现了新的问题:在client端的挂载目录下更新数据时各个server端的export目录也均能看到数据的更新,但是在server端更新数据时,并不能保证client和其他server上也看到数据更新,这个很困惑…

附:server 1的volume file(其他两个出了ip之外均一致)
  1 volume brick
  2         type storage/posix
  3         option directory /home/gfs-data
  4 end-volume
  5
  6 volume locks
  7         type features/posix-locks
  8         subvolumes brick
  9 end-volume
10
11 volume server
12         type protocol/server
13         option transport-type tcp/server
14         #option listen-port 6996
15         #option bind-address 192.168.1.11
16         option transport.socket.listen-port 6996
17         option transport.socket.bind-address 192.168.1.11
18         subvolumes locks
19         #option auth.ip.brick.allow *
20         option auth.addr.brick.allow *
21         option auth.addr.locks.allow *
22 end-volume


附录:client volume file
  1 volume client1
  2   type protocol/client
  3   option transport-type tcp/client
  4   option remote-host 192.168.1.11
  5   option remote-port 6996
  6   option remote-subvolume locks
  7 end-volume
  8
  9 volume client2
10   type protocol/client
11   option transport-type tcp/client
12   option remote-host 192.168.1.12
13   option remote-port 6996
14   option remote-subvolume locks
15 end-volume
16
17 volume client3
18   type protocol/client
19   option transport-type tcp/client
20   option remote-host 192.168.1.13
21   option remote-port 6996
22   option remote-subvolume locks
23 end-volume
24
25 volume bricks
26   type cluster/replicate
27   subvolumes client1 client2 client3
28 end-volume

论坛徽章:
0
5 [报告]
发表于 2009-07-13 20:10 |只看该作者

回复 #4 Kallawa 的帖子

应该是client更新数据,所有的服务器端保持一致才对吧

论坛徽章:
0
6 [报告]
发表于 2009-07-14 10:45 |只看该作者
现在弄好了,配置文件就4楼上的……

我现在在server端的export目录作更新还是在client端的挂载目录下作更新,在其它的点上也都可以看到更新,只是同步有些延迟(比如,我在server 1上touch 1,首先在client上看到更新后的1,之后其他server上有点时间延迟后才看到更新的数据)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP