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

glusterfs-3.6.1.tar.gz 安装过程

时间:2015-01-07 20:32:11      阅读:359      评论:0      收藏:0      [点我收藏+]

标签:

1)下载 安装包 glusterfs-3.6.1.tar.gz
下载地址 http://fossies.org/linux/misc/glusterfs-3.6.1.tar.gz/


cd /etc/yum.repos.d/glusterfs 解压
[root@cn1%ancunkj glusterfs-3.6.1]# tar -zxvf glusterfs-3.6.1.tar.gz
........................
....................... .
[root@cn1%ancunkj glusterfs-3.6.1]# ./autogen.sh
........................
....................... .
[root@cn0%ancunkj glusterfs-3.6.1]# ./configure
........................
....................... .
[root@cn0%ancunkj glusterfs-3.6.1]# make
........................
........................
[root@cn0%ancunkj glusterfs-3.6.1]# make install
..............................
.............................

1)启动服务
[root@cn0%ancunkj glusterfs-3.6.1]# service glusterd start
Starting glusterd:[确定]
................................................
................................................
停止服务
[root@cn0%ancunkj glusterfs-3.6.1]# service glusterd stop
查看状态
[root@cn0%ancunkj glusterfs-3.6.1]# service glusterd status
glusterd 已停

2)集群
[root@cn0%ancunkj glusterfs-3.6.1]# gluster peer probe cn0
peer probe: success. Probe on localhost not needed
[root@cn0%ancunkj glusterfs-3.6.1]# gluster peer probe cn1
peer probe: success.
[root@cn0%ancunkj glusterfs-3.6.1]# gluster peer probe cn2
peer probe: success.
[root@cn0%ancunkj glusterfs-3.6.1]#
--------------------------------------------------------------

你也可以查看它的状态
[root@cn0%ancunkj glusterfs-3.6.1]# gluster peer status
Number of Peers: 2

Hostname: cn1
Uuid: cc638bd4-7d3d-4b3d-bbe7-185561c5fa87
State: Peer in Cluster (Connected)

Hostname: cn2
Uuid: 2bae3c73-558a-4e73-9a98-feb31975d009
State: Peer in Cluster (Connected)
[root@cn0%ancunkj glusterfs-3.6.1]#
注释:每台切片上多可以 看到他们各自的状态。
---------------------------------------------
3)volume 的创建
[root@cn0%ancunkj glusterfs-3.6.1]# gluster volume create stripe4 strip 3 cn0:/mnt/strip1 cn1:/mnt/strip1 cn2:/mnt/strip1 force
-----------------------------------------------------------------------------------------------------------
4) 挂载 mount
[root@cn0%ancunkj mnt]# mount -t glusterfs cn1:/strip1 /mnt/strip-client/
这里是挂载到cn1 所以先启动cn1的 volume .命令如下 :
[root@cn1%ancunkj mnt]# gluster volume start stripe4
------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------
注释:如果volume start stripe4是开启状态 必须要先停止才能 在挂载了。。。。。
[root@cn1%ancunkj mnt]# gluster volume start stripe4
volume start: stripe4: failed: Volume stripe4 already started
[root@cn1%ancunkj mnt]# gluster volume stop stripe4
------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------
5)ec的创建
[root@cn0%ancunkj mnt]# gluster volume create ec3-2 disperse 5 redundancy 2
cn0:/mnt/ec1 cn0:/mnt/ec2 cn1:/mnt/ec1 cn1:/mnt/ec2 cn2:/mnt/ec1 force
----------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------
注释1:ec3-2 这个地方,前面的数字必须大于后面的数字。3>2
注释2:这个地方要注意的是:后面的ec1、ec2 的总个数必须是 disperse 5 的倍数。
cn0: ec1 、ec2
cn1: ec1 、ec2
cn2: ec1
错误:如下
number of bricks is not a multiple of disperse count
Usage: volume create <NEW-VOLNAME> [stripe <COUNT>] [replica <COUNT>] [disperse [<COUNT>]] [redundancy <COUNT>]
[transport <tcp|rdma|tcp,rdma>] <NEW-BRICK>... [force]
--------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------
6)启动 ec3-2模式
[root@cn0%ancunkj mnt]# gluster volume start ec3-2
---------------------------------------------------------------------------------------------------
7)创建 ec-client文件
[root@cn0%ancunkj mnt]# mkdir ec-client
---------------------------------------------------------------------------------------------------
8)挂载
[root@cn0%ancunkj mnt]# mount -t glusterfs cn0:/ec3-2 /mnt/ec-client

---------------------------------------------------------------------------------------------------

glusterfs-3.6.1.tar.gz 安装过程

标签:

原文地址:http://www.cnblogs.com/wutengbiao/p/4209230.html

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