在很多情況下你可以讓 Unix/Linux 不用安裝 glusterfs 套件掛載 Volume,另一個好的選擇就是使用 NFS 通訊協定,使用 NFS 對於 Client 來說是最方便的存取方式。
使用 NFS 掛載之前,先確定 rpcbind
已經啟動:
root # systemctl start rpcbind
root # systemctl enable rpcbind
手動掛載
root # mount -t nfs gfs-01:/disp_vol /gfs/disp_vol
自動掛載
設定 /etc/fstab
gfs-01:/disp_vol /gfs/disp_vol glusterfs _netdev,rw 0 0
掛載測試
root # mount -a
Client 使用 NFS 寫入資料時,會將資料傳送到掛載的節點,再由節點分散寫入到不同的 Brick。
Client 使用 NFS 讀資料時,會由節點取得檔案再傳送給 Client。