分布式文件系统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 ...
随机推荐
- 【Xamarin开发 Android 系列 8】 创建一个Json读取数据应用(上)
后续将内容贴上来...........
- 只允许指定的ip访问本机的指定端口22:
只允许指定的ip访问本机的指定端口22: 允许的的ip:192.168.1.123, 192.168.1.124, 192.168.1.100,其他ip都禁止访问. 切换到root用户 1.在tcp协 ...
- JS实现 鼠标放上去 图片自动放大的效果
前段时间做项目,要实现,一张图片,鼠标放上去图片自动变大的效果,虽然难度不大,但当时也想了一段时间,当时没时间记录一下,现在有时间了,写篇博客把代码给记录一下: 效果如下: 代码如下: <!DO ...
- Oracle中对列加密的方法
Oracle中对列加密的方法 2011-12-22 17:21:13 分类: Linux Oracle支持多种列加密方式: 1,透明数据加密(TDE):create table encrypt_col ...
- perl 学习笔记
一:基础 1:安装perl centos: yum -y install perl 官网:https://www.perl.org/ 升级到5.22:先下载,执行./i ...
- 关于bootstrap--表单(按钮<button>效果、大小、禁用)
1.各种标签实现按钮效果: <button class="btn btn-default" type="button">button标签按钮< ...
- hdu 4869 Turn the pokers(组合数+费马小定理)
Problem Description During summer vacation,Alice stay at home for a long time, with nothing to do. S ...
- Collections.sort()
Comparator是个接口,可重写compare()及equals()这两个方法,用于比价功能:如果是null的话,就是使用元素的默认顺序,如a,b,c,d,e,f,g,就是a,b,c,d,e,f, ...
- [manacher] hdu 3294 Girls' research
题意: 给一个字符x代表真实的a 然后输出的时候转换 然后就是求最长回文子串的串是什么 长度要大于1 思路: 就是裸的manacher,弄清楚下标的转换关系就好了 代码: #include" ...
- Android 通知栏用法例子
当程序意外退出时,可以去掉通知栏上显示的图标 1.创建TestNotificationActivity activity类, package com.notioni.test.notification ...