码迷,mamicode.com
首页 > 其他好文 > 详细

【GlusterFS学习之一】:GlusterFS分布式文件系统的基本概念及搭建

时间:2016-08-11 20:42:41      阅读:447      评论:0      收藏:0      [点我收藏+]

标签:

2.GlusterFS的部署方法。

操作系统:

 centos6.4:

lsb_release -a

技术分享
 

一共有三台机器:

client:

 10.23.85.47 glusterA 

server:

10.23.85.48 glusterB 10.23.85.49 glusterC

glusterfs源代码:http://yunpan.cn/cVHsYCHzGGe43(提取码:710e)(代码版本为3.6.3)

glusterfs ,fuse(http://pan.baidu.com/s/1geInpVd)

 A>安装fuse

yum -y install gcc

tar -zxvf fuse-2.9.3.tar.gz

./configure
make
make install

B>安装glusterfs

在三台机器上解压文件:

yum -y install unzip

 unzip gluster3.6.zip

 yum install -y aclocal autoconf aotuheader automake libtool

yum install -y  automake autoconf libtool flex bison openssl-devel libxml2-devel python-devel libaio-devel libibverbs-devel librdmacm-devel readline-devel lvm2-devel glib2-devel userspace-rcu-devel libcmocka-devel  

./configure                                      

make && make install 

安装好之后执行:

glusterfs --version

技术分享

 

说明安装完成,在三台机器上执行同样的操作。

每台gluster都要启动,同时关闭防火墙

systemctl stop firewalld.service #停止firewall

systemctl disable firewalld.service #禁止firewall开机启动

技术分享

error:connection failed.please check if gluster daemon is operational. 需要开启glusterd守护进程

技术分享

当然其他的server也要运行:service glusterd start命令,开启守护进行,否则会报错:peer probe: failed: Probe returned with unknown errno 107.

技术分享

查看集群结点的信息:

在server glusterB查看:

技术分享

在server glusterC查看:

技术分享

 

以/data/gluster为共享目录,创建名为img的卷,副本数为2:

技术分享

 

启动volume并查看卷状态:

技术分享

 

在客户端挂载卷img:

首先用df -h命令查看挂载信息:

技术分享

执行将卷img挂在到客户端的/mnt挂载点上:

技术分享

 

在部署好之后,我们尝试对文件进行操作,看看效果:

创建文件:

client端:

技术分享

server端:

技术分享

技术分享

删除文件:

client端:

技术分享

server端:

技术分享

技术分享

 

至此,GlusterFS分布式文件系统的基本概念和搭建工作完成。

(转载 http://www.ithao123.cn/content-4813762.html)

【GlusterFS学习之一】:GlusterFS分布式文件系统的基本概念及搭建

标签:

原文地址:http://www.cnblogs.com/meditator/p/5762367.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!