相對於 Gluster Storage Server 來說,Client 上的設定就較為簡單了,只要安裝 Native Client 的 FUSE 套件就可以了。
設定 /etc/yum.repos.d/glusterfs-3.6.repo
[glusterfs-3.6]
name=GlusterFS 3.6
baseurl=http://download.gluster.org/pub/gluster/glusterfs/3.6/LATEST/EPEL.repo/epel-$releasever/$basearch/
enabled=1
skip_if_unavailable=1
gpgcheck=1
gpgkey=http://download.gluster.org/pub/gluster/glusterfs/3.6/LATEST/EPEL.repo/pub.key
安裝 CentOS EPEL 套件資訊
root # yum install -y http://mirror01.idc.hinet.net/EPEL/7/x86_64/e/epel-release-7-5.noarch.rpm
CentOS EPEL 套件為 Fedora 所維護,在世界各地都有鏡象(Mirror)站台,本例是使用中華電信的 Mirror Site。
安裝 Glsuter Storage Server
root # yum install -y glusterfs-fuse
安裝完成後,就可使用 mount -t glusterfs
指令進行目錄掛載。
請確定 Gluster Native Client 的版本永遠要跟 Server 一樣或是更新,這樣才不會出現問題。
如果您考慮將客戶端使用 NFS 的方式存取 Gluster Storage,那麼就不用進行任何的設定,只要啟用 rpcinfo
的服務就可以了。
Gluster Storage 預設提供 NFSv3 版本,並使用 TCP 的方式進行連線。
啟用 rpcinfo
root # systemctl enable rpcbind
root # systemctl start rpcbind