`
holysilent
  • 浏览: 697 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Glusterfs 分布式存储环境搭建笔记

阅读更多

1、由于开发环境暂时无法接入互联网,故需要自己准备好RPM安装包,可在本地虚拟机上利用一下命令将glusterfs所需要的安装包下载下来:

      1)安装yum下载插件 yum install  --downloadonly --downloaddir=/home/admin/glusterfs glusterfs-server

      2)rpm –ivh epel-release-6-8.noarch

       3)添加资源

wget  -P /etc/yum.repos.d http://download.gluster.org/pub/gluster/glusterfs/3.7/3.7.5/CentOS/glusterfs-epel.repo

4) 下载安装包:

       yum install  --downloadonly --downloaddir=/home/admin/glusterfs glusterfs-server

 

2、安装glusterfs

rpm –ivh *

 

3、启动glusterfs

service  glusterd start

chkconfig glusterd on

4、配置整个GlusterFS集群

[root@glusterfs1 ~]# gluster peer probe glusterfs1

peer probe: success. Probe on localhost not needed

[root@glusterfs1 ~]#

 

[root@glusterfs1 ~]# gluster peer probe glusterfs2

peer probe: success. 

[root@glusterfs1 ~]# 

 

5、查看节点状态

gluster peer status

 

6、创建存储目录

[root@glusterfs1 share]# mkdir -p  /usr/local/share/models

 

7、创建glusterfs磁盘

[root@glusterfs1 share]# gluster volume create models replica 2 glusterfs1:/usr/local/share/models glusterfs2:/usr/local/share/models force

volume create: models: success: please start the volume to access data

[root@glusterfs1 share]# 

 

8、启动数据卷

 

[root@glusterfs1 share]# gluster volume start models

volume start: models: success

[root@glusterfs1 share]# 

 

9、客户端安装glusterfs

Rpm –ivh *

10、创建挂载点

[root@master3 ~]#mkdir -p /mnt/models

11、挂载glusterfs

[root@master3 ~]# mount -t glusterfs -o rw glusterfs1:models /mnt/models/

mount -t glusterfs -o rw CBHKZY-HP-03:models /mnt/portal/userfile

 

注意事项: /etc/hosts配置好; 关闭防火墙  参考:  http://www.datacoder.cn/distributestore/537

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics