分布式文件系统glusterfs安装步骤
我的系统是 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/
- [root@redhat1 glusterfs]# more protocol-server.vol
- ### Export volume "brick" with the contents of "/home/export" directory.
- volume brick
- type storage/posix # POSIX FS translator
- option directory /data/movies # Export this directory
- end-volume
- ### Add network serving capability to above brick.
- volume server
- type protocol/server
- option transport-type tcp # For TCP/IP transport
- option transport.socket.listen-port 24016
- # option transport-type ib-verbs # For Infiniband Verbs transport
- # option transport.ib-verbs.work-request-send-size 131072
- # option transport.ib-verbs.work-request-send-count 64
- # option transport.ib-verbs.work-request-recv-size 131072
- # option transport.ib-verbs.work-request-recv-count 64
- # option transport.ib-verbs.listen-port 24016
- # option bind-address 192.168.1.10 # Default is to listen on all interfaces
- # option client-volume-filename /etc/glusterfs/glusterfs-client.vol
- subvolumes brick
- option auth.addr.brick.allow 192.168.* # Allow access to "brick" volume
- end-volume
上面是 服务器端 的配置文件,每台服务器的配置都一样, 共享数据目录为 /data/movies
启动服务器端的命令为 :
glusterfsd -l /etc/glusterfs/g.log -f /etc/glusterfs/protocol-server.vol
下面的配置文件时客户端的配置文件:
- volume client0
- type protocol/client
- option transport-type tcp # for TCP/IP transport
- # option transport-type ib-sdp # for Infiniband transport
- option remote-host 192.168.2.85 # IP address of the remote brick
- option transport.socket.remote-port 24016
- # option transport-type ib-verbs # for Infiniband verbs transport
- # option transport.ib-verbs.work-request-send-size 1048576
- # option transport.ib-verbs.work-request-send-count 16
- # option transport.ib-verbs.work-request-recv-size 1048576
- # option transport.ib-verbs.work-request-recv-count 16
- # option transport.ib-verbs.remote-port 24016
- option remote-subvolume brick # name of the remote volume
- # option transport-timeout 30 # default value is 120seconds
- end-volume
- volume client1
- type protocol/client
- option transport-type tcp # for TCP/IP transport
- # option transport-type ib-sdp # for Infiniband transport
- option remote-host 192.168.2.222 # IP address of the remote brick
- option transport.socket.remote-port 24016
- # option transport-type ib-verbs # for Infiniband verbs transport
- # option transport.ib-verbs.work-request-send-size 1048576
- # option transport.ib-verbs.work-request-send-count 16
- # option transport.ib-verbs.work-request-recv-size 1048576
- # option transport.ib-verbs.work-request-recv-count 16
- # option transport.ib-verbs.remote-port 24016
- option remote-subvolume brick # name of the remote volume
- # option transport-timeout 30 # default value is 120seconds
- end-volume
- volume client2
- type protocol/client
- option transport-type tcp # for TCP/IP transport
- # option transport-type ib-sdp # for Infiniband transport
- option remote-host 192.168.2.98 # IP address of the remote brick
- option transport.socket.remote-port 24016
- # option transport-type ib-verbs # for Infiniband verbs transport
- # option transport.ib-verbs.work-request-send-size 1048576
- # option transport.ib-verbs.work-request-send-count 16
- # option transport.ib-verbs.work-request-recv-size 1048576
- # option transport.ib-verbs.work-request-recv-count 16
- # option transport.ib-verbs.remote-port 24016
- option remote-subvolume brick # name of the remote volume
- # option transport-timeout 30 # default value is 120seconds
- end-volume
- volume unify
- type cluster/distribute
- subvolumes client0 client1 client2
- 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安装步骤的更多相关文章
- 分布式文件系统MooseFS安装步骤
1. 安装 1.1 准备安装环境 首先选择一台比较好的服务器做master,如果可以在选择一台做为master的备份服务器最好.然后其他的服务器当chunkserver. 为了方便说明问题,我这 ...
- 分布式文件系统 Mogilefs 安装步骤
我这里的环境都是 RHEL 5 的环境. MySQL 数据库 和 tracker 都放到一台服务器上, 为 192.168.2.85 storage server两台, 分别为 192.168.2.9 ...
- 分布式文件系统 fastDFS 安装步骤
安装 fastDFS 很简单. 先安装 libevent, 安装成功后,安装fastDFS. ./make.sh ./make.sh install 我使用一台tracker服务器 192.168. ...
- Dubbo入门到精通学习笔记(八):ActiveMQ的安装与使用(单节点)、Redis的安装与使用(单节点)、FastDFS分布式文件系统的安装与使用(单节点)
文章目录 ActiveMQ的安装与使用(单节点) 安装(单节点) 使用 目录结构 edu-common-parent edu-demo-mqproducer edu-demo-mqconsumer 测 ...
- FastDFS 分布式文件系统的安装与使用(单节点)
FastDFS 分布式文件系统的安装与使用(单节点) 跟踪服务器:192.168.4.121 (edu-dfs-tracker-01) 存储服务器:192.168.4.125 (edu-dfs-sto ...
- 分布式文件系统GlusterFS
转自于:http://www.cnblogs.com/zitjubiz/archive/2012/11/30/Distributed_File_System_glusterFS.html Gluste ...
- 分布式文件系统FastDFS安装教程
前言 FastDFS(Fast Distributed File System)是一款开源轻量级分布式文件系统,本文不讲解原理和架构,只是在个人使用部署过程中耗费了好长时间和精力,遇到了很多的坑,于是 ...
- 分布式文件系统---GlusterFS
1.1 分布式文件系统 1.1.1 什么是分布式文件系统 相对于本机端的文件系统而言,分布式文件系统(英语:Distributed file system, DFS),或是网络文件系统(英语:Netw ...
- 分布式文件系统fastdfs安装以及python调用
fastfds的安装和使用 一.所需依赖 操作系统:centos7.x(注意的是centos使用yum安装相关依赖) fastdfs:V6.06.tar.gz libfastcommon:V1.0.4 ...
随机推荐
- msg="No symbol table is loaded. Use the \"file\" command."
用Eclipse调试的时候,下断点的unresolved breakpoint,报的是标题上的错误.原因显然是没有加载符号表,需要用gdb的file命令加载符号表. (gdb) file [exec_ ...
- V$LATCH_PARENT和V$LATCH_CHILDREN
V$LATCH_PARENT contains statistics about parent latches. The columns of V$LATCH_PARENT are identical ...
- js实现编码,解码
<p><script type="text/javascript">// <![CDATA[var decToHex = function(str) ...
- Spark集群模式概述
作者:foreyou出处:http://www.foreyou.net/2015/06/22/spark-cluster-mode-overview/声明:本文采用以下协议进行授权: 署名-非商用|C ...
- HDU4821---字符串hash,map判重
这是2013年长春区域赛的铜牌题...然而第一次做的时候一直觉得会超时的..最后才知道并没有想象中的那么恐怖: 这题有两个注意的地方: (1)h[i] = h[i-1] * seed + s[i] - ...
- 曾经的足迹——对Linux CAN驱动的理解(1)
在Ti的AM335X系列Cortext-A8芯片中,CAN模块采用D_CAN结构,实质即两路CAN接口. 在此分享一下对基于AM335X的Linux CAN驱动源码的理解.下面来分析它的驱动源码及其工 ...
- epoll的原理和使用方法
设想一个场景:有100万用户同一时候与一个进程保持着TCP连接,而每个时刻仅仅有几十个或几百个TCP连接时活跃的(接收到TCP包),也就是说,在每一时刻,进程值须要处理这100万连接中的一小部分连接. ...
- 湖南省第六届大学生程序设计大赛原题 F Biggest Number (UVA1182)
Biggest Number http://acm.hust.edu.cn/vjudge/contest/view.action?cid=30851#problem/F 解题思路:DFS(检索)+BF ...
- Android Fragment详解(六):Fragement示例
把条目添加到动作栏 你的fragment们可以向activity的菜单(按Manu键时出现的东西)添加项,同时也可向动作栏(界面中顶部的那个区域)添加条目,这都需通过实现方法onCreateOptio ...
- HDU 2074 叠筐
叠筐 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission ...