Configure GlusterFS Client to mount GlusterFS volumes.

To mount with GlusterFS Native, Set like follows.

The example below shows to mount [vol_distributed] volume to [/mnt].

[root@client ~]# yum -y install centos-release-gluster9
[root@client ~]# sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/CentOS-Gluster-9.repo
[root@client ~]# yum --enablerepo=centos-gluster9 -y install glusterfs glusterfs-fuse
# OK to specify any target nodes in cluster
[root@client ~]# mount -t glusterfs node01.srv.world:/vol_distributed /mnt
[root@client ~]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs tmpfs 1.9G 8.6M 1.9G 1% /run
tmpfs tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/mapper/centos-root xfs 26G 1.7G 25G 7% /
/dev/vda1 xfs 1014M 319M 696M 32% /boot
tmpfs tmpfs 379M 0 379M 0% /run/user/0
node01.srv.world:/vol_distributed fuse.glusterfs 52G 3.8G 49G 8% /mnt
# verify read and write
[root@client ~]# echo "Gluster write test" > /mnt/testfile.txt
[root@client ~]# cat /mnt/testfile.txt
Gluster write test

摘自 GlusterFS 9 : GlusterFS Client · Server World,版权归原作者所有,此处仅作个人学习整理。