Mount a GlusterFS volume gluster mount时候设置多个读取配置服务器
kevin.Zhu 发布于:2021-5-31 15:22 分类:文摘 有 16 人浏览,获得评论 0 条
https://blog.51cto.com/einst/1594668
https://www.jamescoyle.net/how-to/439-mount-a-glusterfs-volume
Easy way to mount
vi /etc/fstab
Replace [HOST] with your GlusterFS server, [VOLNAME] with the Gluster FS volume to mount and [MOUNT] with the location to mount the storage to.
[HOST]:/[VOLUME] /[MOUNT] glusterfs defaults,_netdev 0 0
Example:
gfs1.jamescoyle.net:/datastore /mnt/datastore glusterfs defaults,_netdev 0 0
Finally, reboot your machine to make the volume appear in df.
df -h gfs1.jamescoyle.net:/testvol 30G 1.2G 27G 5% /mnt/volume
More redundant mount
The trouble with the above method is that there is a single point of failure. The client only has one GlusterFS server to connect to. To set up a more advanced mount, we have two options; create a volume config file, or use backupvolfile-server in the fstab mount. Remember this is not to specify where all the distributed volumes are, it’s to specify a server to query all the volume bricks.
fstab method
We can use the parameter backupvolfile-server to point to our secondary server. The below example indicates how this could be used.
gfs1.jamescoyle.net:/datastore /mnt/datastore glusterfs defaults,_netdev,backupvolfile-server=gfs2.jamescoyle.net 0 0
Using a volume config file
Create a volume config file for your GlusterFS client.