Gluster Storage System

使用 Native Client

一個 Gluster Volume 會由多個 Brick 所組成,而且可能分散在多個節點之中。

您可以選擇多個節點中的其中一個當做 Mount Point,該節點會回應 Volume 的所有 Brick 與節點資訊。所以若要使用 GlusterFS 連接 Volume 則 Client 與各節點之間的網路就要能相通。

Gluster Native Client 也支援 POSIX 的權限管理設制,您可以使用 chownchmodsetfacl 等工具設定檔案權限。

掛載 GlusterFS Volume

本例示範使用 glusterfs 掛載 Gluster 設定好的 Volume。

  • Mount Point: gfs-01:/disp_vol
  • Protocol: glusterfs
  • Mount Direcotory: /gfs/disp_vol

使用 glusterfs 掛載之前,在 Client 要安裝 glusterfs-fuse 套件,在 CentOS、RHEL 環境之下可以使用下列方式安裝:

root # yum install -y glusterfs-fuse

掛載方式

  • 手動掛載

      root # mount -t glusterfs gfs-01:/disp_vol /gfs/disp_vol
    
  • 自動掛載

    1. 設定 /etc/fstab

      gfs-01:/disp_vol /gfs/disp_vol glusterfs _netdev,rw,acl 0 0
      

      請特別注意要加上 _netdev 選項。

      使用 acl 選項可以在掛載目錄中啟用 POSIX ACL 的支援。

    2. 掛載測試

      root # mount -a
      

資料寫入流程

GlusterFS Data Write Flow

使用 GlusterFS 存取 Volume 的時候,資料會直接寫入該 Brick。在多個檔案同時寫入也會直接向檔案所有的 Brick 寫入。

資料讀取流程

GlusterFS Data Read Flow

使用 GlusterFS 存取 Volume 的時候,Client 直接讀取該 Brick。在多個檔案同時讀取也會直接向檔案所有的 Brick 取得,在大流量時可以有效達到分散式的效能。