1.下载依赖
已经整理好,下载可以直接安装
https://download.csdn.net/download/qq_29940863/11376868
下载网址
https://opsx.alibaba.com/mirror?lang=zh-CN
http://cn.archive.ubuntu.com/ubuntu/pool/main/
2.安装
解压压缩包并上传到服务器
cd glusterfs
sudo dpkg -i *.deb
vim /etc/hosts
*.*.*.*7 gfs1
*.*.*.*6 gfs2
*.*.*.*9 gfs3
3.启动服务
sudo systemctl start glusterfsd
sudo systemctl enable glusterd
4.创建可信任池
gfs1下
sudo gluster peer probe gfs2
sudo gluster peer probe gfs3
sudo gluster peer status
删除可信任池
sudo gluster peer detach gfs2
5.创建分布式GlusterFS卷
sudo gluster volume create vol01 replica 3 transport tcp gfs1:/data/glusterfs gfs2:/data/glusterfs gfs3:/data/glusterfs
sudo gluster volume info
sudo gluster volume status
sudo gluster volume start vol01
sudo gluster volume status
删除卷
sudo gluster volume stop
sudo gluster volume delete
6.挂载
sudo mount -t glusterfs gfs2:/vol01 /test
sudo mount -t glusterfs gfs3:/vol01 /test1
df -h /test
sudo umount /test1
7.参考
https://blog.csdn.net/goser329/article/details/78569257