我的系统是 RHEL5 , 可能环境不一样, 需要安装的第三方依赖不一样啊, 反正大家在安装的过程中缺少什么就去安装什么, 一般都会有提示的。

下载   glusterfs-3.2.0.tar.gz  源码包。 随便解压到一个目录。

glusterfs 需要 fuse 的支持, 在安装开始之前请先安装 fuse。

fuse可以到http://fuse.sourceforge.net/进行下载

安装fuse的步骤如下:

./configure

make

make install

glusterfs 需要 ctypes 的支持, 在安装开始之前请先安装 ctypes。

ctypes看的下载地址为  http://python.net/crew/theller/ctypes/

ctypes库安装时需要使用 python,安装步骤如下

            python setup.py build
            python setup.py test
            python setup.py install 

安装glusterfs, 步骤如下:

cd  /home/glusterfs-3.2.0

./configure   --enable-fusermount

make

make install


下来需要进行配置,我这里的环境为 :

server端3台----------- 192.168.2.85  和  192.168.2.222  和  192.168.2.98

client 端1台------------192.168.2.55

配置文件所在的目录为  /etc/glusterfs/

  1. [root@redhat1 glusterfs]# more protocol-server.vol
  2. ### Export volume "brick" with the contents of "/home/export" directory.
  3. volume brick
  4. type storage/posix                   # POSIX FS translator
  5. option directory /data/movies        # Export this directory
  6. end-volume
  7. ### Add network serving capability to above brick.
  8. volume server
  9. type protocol/server
  10. option transport-type tcp      # For TCP/IP transport
  11. option transport.socket.listen-port 24016
  12. # option transport-type ib-verbs # For Infiniband Verbs transport
  13. # option transport.ib-verbs.work-request-send-size  131072
  14. # option transport.ib-verbs.work-request-send-count 64
  15. # option transport.ib-verbs.work-request-recv-size  131072
  16. # option transport.ib-verbs.work-request-recv-count 64
  17. # option transport.ib-verbs.listen-port 24016
  18. #  option bind-address 192.168.1.10     # Default is to listen on all interfaces
  19. # option client-volume-filename /etc/glusterfs/glusterfs-client.vol
  20. subvolumes brick
  21. option auth.addr.brick.allow 192.168.* # Allow access to "brick" volume
  22. end-volume

上面是  服务器端 的配置文件,每台服务器的配置都一样, 共享数据目录为 /data/movies

启动服务器端的命令为  :

 glusterfsd  -l  /etc/glusterfs/g.log  -f  /etc/glusterfs/protocol-server.vol 

下面的配置文件时客户端的配置文件:

  1. volume client0
  2. type protocol/client
  3. option transport-type tcp     # for TCP/IP transport
  4. # option transport-type ib-sdp  # for Infiniband transport
  5. option remote-host 192.168.2.85     # IP address of the remote brick
  6. option transport.socket.remote-port 24016
  7. # option transport-type ib-verbs # for Infiniband verbs transport
  8. # option transport.ib-verbs.work-request-send-size  1048576
  9. # option transport.ib-verbs.work-request-send-count 16
  10. # option transport.ib-verbs.work-request-recv-size  1048576
  11. # option transport.ib-verbs.work-request-recv-count 16
  12. # option transport.ib-verbs.remote-port 24016
  13. option remote-subvolume brick        # name of the remote volume
  14. # option transport-timeout 30          # default value is 120seconds
  15. end-volume
  16. volume client1
  17. type protocol/client
  18. option transport-type tcp     # for TCP/IP transport
  19. # option transport-type ib-sdp  # for Infiniband transport
  20. option remote-host 192.168.2.222     # IP address of the remote brick
  21. option transport.socket.remote-port 24016
  22. # option transport-type ib-verbs # for Infiniband verbs transport
  23. # option transport.ib-verbs.work-request-send-size  1048576
  24. # option transport.ib-verbs.work-request-send-count 16
  25. # option transport.ib-verbs.work-request-recv-size  1048576
  26. # option transport.ib-verbs.work-request-recv-count 16
  27. # option transport.ib-verbs.remote-port 24016
  28. option remote-subvolume brick        # name of the remote volume
  29. # option transport-timeout 30          # default value is 120seconds
  30. end-volume
  31. volume client2
  32. type protocol/client
  33. option transport-type tcp     # for TCP/IP transport
  34. # option transport-type ib-sdp  # for Infiniband transport
  35. option remote-host 192.168.2.98     # IP address of the remote brick
  36. option transport.socket.remote-port 24016
  37. # option transport-type ib-verbs # for Infiniband verbs transport
  38. # option transport.ib-verbs.work-request-send-size  1048576
  39. # option transport.ib-verbs.work-request-send-count 16
  40. # option transport.ib-verbs.work-request-recv-size  1048576
  41. # option transport.ib-verbs.work-request-recv-count 16
  42. # option transport.ib-verbs.remote-port 24016
  43. option remote-subvolume brick        # name of the remote volume
  44. # option transport-timeout 30          # default value is 120seconds
  45. end-volume
  46. volume unify
  47. type cluster/distribute
  48. subvolumes client0 client1 client2
  49. end-volume

启动客户端的命令为:

glusterfs -l /etc/glusterfs/glusterfs.log -f /etc/glusterfs/protocol-client.vol /mnt

启动后可以检查  /etc/glusterfs/glusterfs.log 文件, 进行查看日志。

也可以用 df  -h 命令来查看,如下代表成功

glusterfs#/etc/glusterfs/protocol-client.vol
                      654G  133G  487G  22% /mnt

由于glusterfs 使用了 fuse, 所以就和使用本地的一个目录一样使用这个分布式的文件系统了。


不信你就执行一下   :

ls   /mnt 

cp  /etc/glusterfs/protocol-client.vol   /mnt  

ls  /mnt

祝大家工作愉快 !

在配置的过程中如果有什么问题, 大家还可以参考

http://hi.baidu.com/farmerluo/blog/category/Glusterfs

介绍的还是蛮详细的。

http://blog.csdn.net/langeldep/article/details/6587207

分布式文件系统glusterfs安装步骤的更多相关文章

  1. 分布式文件系统MooseFS安装步骤

    1.    安装 1.1 准备安装环境 首先选择一台比较好的服务器做master,如果可以在选择一台做为master的备份服务器最好.然后其他的服务器当chunkserver. 为了方便说明问题,我这 ...

  2. 分布式文件系统 Mogilefs 安装步骤

    我这里的环境都是 RHEL 5 的环境. MySQL 数据库 和 tracker 都放到一台服务器上, 为 192.168.2.85 storage server两台, 分别为 192.168.2.9 ...

  3. 分布式文件系统 fastDFS 安装步骤

    安装 fastDFS 很简单. 先安装 libevent, 安装成功后,安装fastDFS. ./make.sh ./make.sh install 我使用一台tracker服务器  192.168. ...

  4. Dubbo入门到精通学习笔记(八):ActiveMQ的安装与使用(单节点)、Redis的安装与使用(单节点)、FastDFS分布式文件系统的安装与使用(单节点)

    文章目录 ActiveMQ的安装与使用(单节点) 安装(单节点) 使用 目录结构 edu-common-parent edu-demo-mqproducer edu-demo-mqconsumer 测 ...

  5. FastDFS 分布式文件系统的安装与使用(单节点)

    FastDFS 分布式文件系统的安装与使用(单节点) 跟踪服务器:192.168.4.121 (edu-dfs-tracker-01) 存储服务器:192.168.4.125 (edu-dfs-sto ...

  6. 分布式文件系统GlusterFS

    转自于:http://www.cnblogs.com/zitjubiz/archive/2012/11/30/Distributed_File_System_glusterFS.html Gluste ...

  7. 分布式文件系统FastDFS安装教程

    前言 FastDFS(Fast Distributed File System)是一款开源轻量级分布式文件系统,本文不讲解原理和架构,只是在个人使用部署过程中耗费了好长时间和精力,遇到了很多的坑,于是 ...

  8. 分布式文件系统---GlusterFS

    1.1 分布式文件系统 1.1.1 什么是分布式文件系统 相对于本机端的文件系统而言,分布式文件系统(英语:Distributed file system, DFS),或是网络文件系统(英语:Netw ...

  9. 分布式文件系统fastdfs安装以及python调用

    fastfds的安装和使用 一.所需依赖 操作系统:centos7.x(注意的是centos使用yum安装相关依赖) fastdfs:V6.06.tar.gz libfastcommon:V1.0.4 ...

随机推荐

  1. msg="No symbol table is loaded. Use the \"file\" command."

    用Eclipse调试的时候,下断点的unresolved breakpoint,报的是标题上的错误.原因显然是没有加载符号表,需要用gdb的file命令加载符号表. (gdb) file [exec_ ...

  2. V$LATCH_PARENT和V$LATCH_CHILDREN

    V$LATCH_PARENT contains statistics about parent latches. The columns of V$LATCH_PARENT are identical ...

  3. js实现编码,解码

    <p><script type="text/javascript">// <![CDATA[var decToHex = function(str) ...

  4. Spark集群模式概述

    作者:foreyou出处:http://www.foreyou.net/2015/06/22/spark-cluster-mode-overview/声明:本文采用以下协议进行授权: 署名-非商用|C ...

  5. HDU4821---字符串hash,map判重

    这是2013年长春区域赛的铜牌题...然而第一次做的时候一直觉得会超时的..最后才知道并没有想象中的那么恐怖: 这题有两个注意的地方: (1)h[i] = h[i-1] * seed + s[i] - ...

  6. 曾经的足迹——对Linux CAN驱动的理解(1)

    在Ti的AM335X系列Cortext-A8芯片中,CAN模块采用D_CAN结构,实质即两路CAN接口. 在此分享一下对基于AM335X的Linux CAN驱动源码的理解.下面来分析它的驱动源码及其工 ...

  7. epoll的原理和使用方法

    设想一个场景:有100万用户同一时候与一个进程保持着TCP连接,而每个时刻仅仅有几十个或几百个TCP连接时活跃的(接收到TCP包),也就是说,在每一时刻,进程值须要处理这100万连接中的一小部分连接. ...

  8. 湖南省第六届大学生程序设计大赛原题 F Biggest Number (UVA1182)

    Biggest Number http://acm.hust.edu.cn/vjudge/contest/view.action?cid=30851#problem/F 解题思路:DFS(检索)+BF ...

  9. Android Fragment详解(六):Fragement示例

    把条目添加到动作栏 你的fragment们可以向activity的菜单(按Manu键时出现的东西)添加项,同时也可向动作栏(界面中顶部的那个区域)添加条目,这都需通过实现方法onCreateOptio ...

  10. HDU 2074 叠筐

    叠筐 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission ...