# yum install xfsprogs
# mkfs.xfs -i size=512 /dev/vdb
# mkdir -p /GlusterFS/brick1
# vi /etc/fstab 加入
/dev/vdb /GlusterFS/brick1 xfs defaults 1 2
# mount -a && mount
# wget -P /etc/yum.repos.d http://download.gluster.org/pub/gluster/glusterfs/LATEST/EPEL.repo/glusterfs-epel.repo
# yum install glusterfs-{,fuse,server}
# service glusterd start
# /etc/init.d/iptables stop
# vi /etc/sysconfig/selinux
SELINUX= enforcing 改成 SELINUX= permissive
儲存後重開機
# chkconfig glusterd on
# chkconfig glusterfsd on
以上步驟對所有機器都做
# vi /etc/hosts
192.168.1.101 Gluster1
192.168.1.102 Gluster2
192.168.1.103 Gluster3
192.168.1.104 Gluster4
將所有的機器加到列表裡
# gluster peer probe Gluster2
# gluster peer probe Gluster3
# gluster peer probe Gluster4
因為自己是Gluster1,所以Gluster1省略,在其他台做時也是省略自己,做其他三台
# gluster volume create GlusterFS replica 2 Gluster1:/GlusterFS/brick1/ Gluster2:/GlusterFS/brick1/ Gluster3:/GlusterFS/brick1/ Gluster4:/GlusterFS/brick1/
# gluster volume start GlusterFS
# gluster volume info
以上是Server端的安裝,以下是Client端的安裝
# wget -P /etc/yum.repos.d http://download.gluster.org/pub/gluster/glusterfs/LATEST/EPEL.repo/glusterfs-epel.repo
# yum install glusterfs
# yum install glusterfs-fuse
# mount -t glusterfs Gluster1:/GlusterFS /GlusterFS/
這樣client系統裡就會多了一個GlusterFS的目錄,它就是使用Gluster分享的空間.
本文參考自 http://www.mobile01.com/topicdetail.php?f=494&t=3066757
留言列表