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

glusterfs安装和初始化

时间:2015-08-02 06:18:34      阅读:359      评论:0      收藏:0      [点我收藏+]

标签:

系统环境:centos 6 x86_64  

集群环境:server1 server2

1,添加glusterfs源到centos

wget -P /etc/yum.repos.d http://download.gluster.org/pub/gluster/glusterfs/LATEST/RHEL/glusterfs-epel.repo

安装glusterfs-server

yum install glusterfs-server

这时,如果提示缺少pyxattr和liburcu两个包,可以这样下载和安装

wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/visionsoftware/CentOS_CentOS-6/x86_64/pyxattr-0.5.0-4.2.x86_64.rpm
rpm -ivh
pyxattr-0.5.0-4.2.x86_64.rpm

wget ftp://ftp.univie.ac.at/systems/linux/fedora/epel/6/x86_64/pyxattr-0.5.0-4.2.x86_64.rpm
rpm -ivh
pyxattr-0.5.0-4.2.x86_64.rpm

2,在server1中执行

gluster peer probe server2

在server2中执行

gluster peer probe server1

3,在server1和server2中分别执行

mkdir /data/brick1/gv0

4,在server1或server2任一一台机器上执行

gluster volume create gv0 replica 2 server1:/data/brick1/gv0 server2:/data/brick1/gv0

gluster volume start gv0

5,测试glusterfs安装结果

mount -t glusterfs server1:/gv0 /mnt

for i in `seq -w 1 100`; do cp -rp /var/log/messages /mnt/copy-test-$i; done

ls -lA /mnt | wc -l

ls -lA /data/brick1/gv0

 

随笔内容主要摘抄自glusterfs官方文档

 

glusterfs安装和初始化

标签:

原文地址:http://www.cnblogs.com/unsea/p/4694973.html

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