glusterfs相关笔记
Date: 2019/10/26 Categories: 工作 Tags: glusterfs
在centos设置可能是最容易的分布式文件系统, 毕竟是redhat的东西
compared to ceph
“Ceph is part and parcel to the OpenStack story. In the community, [the majority] of the OpenStack implementations were using Ceph as the storage substrate. Gluster is classic file serving, second-tier storage, and deep archiving.”
(https://technologyadvice.com/blog/information-technology/ceph-vs-gluster/)
安装
先设置三台服务器
yum install wget
yum install centos-release-gluster -y
yum install epel-release -y
yum install glusterfs-server -y
启动服务
systemctl start glusterd
systemctl enable glusterd
寻找peers
找到另两台服务器
gluster peer probe server2
gluster peer probe server3
建立bricks
在三台服务器上分别建三个目录, 注意/data
是glusterfs最终会放置数据的分区,
保留空间
mkdir -p /data/glusters/myvol1/brick1/brick
建一个分布式volume
我们使用stripe, 具体含义和raid中一样
gluster volume create myvol1 stripe 3 server1:/data/glusters/myvol1/brick1/brick server2:/data/glusters/myvol1/brick1/brick server3:/data/glusters/myvol1/brick1/brick
gluster volume start myvol1
gluster volume info myvol1
gluster volume set shadowvol nfs.disable off # 启用nfs挂载
挂载volume
# 注意在server1上挂载server1
mount -t nfs -o vers=3 server1:/myvol1 /mnt/glusters
查看空间
df /mnt/glusters