【Amadeus原创】GFS 安装使用
准备环境:
一、修改每台主机的host文件,在/etc/hosts下添加内容:
172.62.21.44 gfs1
172.62.21.43 gfs2
172.62.21.37 gfs3
二、分别安装gfs server端:
1. 安装
yum install centos-release-gluster -y
yum install -y glusterfs glusterfs-server glusterfs-fuse glusterfs-rdma
2.设置开机自启
systemctl start glusterd.service
systemctl enable glusterd.service
3.添加集群
gluster peer probe gfs1
gluster peer probe gfs2
gluster peer probe gfs3
gluster peer status
三、创建数据目录
mkdir -p /application/gluster/data
gluster volume create gfs-gluster replica 3 transport tcp gfs1:/application/gluster/data gfs2:/application/gluster/data gfs3:/application/gluster/data force
gluster volume info
gluster volume start gfs-gluster
四、客户端使用
yum install -y glusterfs glusterfs-fuse
mkdir -p /application/gfsmount/
mount -t glusterfs gfs1:gfs-gluster /application/gfsmount/