GlusterFS on ZFS

nano /etc/apt/sources.list

增加:

deb [arch=amd64] https://download.gluster.org/pub/gluster/glusterfs/LATEST/Debian/stretch/amd64/apt stretch main
echo deb [arch=amd64] https://download.gluster.org/pub/gluster/glusterfs/4.0/LATEST/Debian/stretch/amd64/apt stretch main > /etc/apt/sources.list.d/gluster.list

增加key:

3:
wget -O - https://download.gluster.org/pub/gluster/glusterfs/3.13/rsa.pub | apt-key add -
4:
wget -O - https://download.gluster.org/pub/gluster/glusterfs/4.0/rsa.pub | apt-key add -

設定zpool Type:

zfs set acltype=posixacl RAID/DATA

nano /etc/hosts 增加:

10.0.1.50 pve-gf
10.0.1.51 pve2-gf

安裝套件:

apt install glusterfs-server

綁定機器:

gluster peer probe 10.0.1.50
gluster peer probe 10.0.1.51

顯示狀態:

gluster peer status

狀態:

Number of Peers: 2
Hostname: pve
Uuid: afffc8___________7345f9d5
State: Peer in Cluster (Connected)

Hostname: pve2
Uuid: a62____________e9f9f1d
State: Peer in Cluster (Connected)

建立目錄抄寫方式:

gluster volume create DATA transport tcp replica 2 r730-gf:/RAID/DATA r230-gf:/RAID/DATA force

啟用:

gluster volume start DATA

設置儲存池:

gluster volume set DATA performance.cache-size 256MB
gluster volume set DATA network.ping-timeout 5
gluster volume set DATA cluster.server-quorum-type server
gluster volume set DATA cluster.quorum-type fixed
gluster volume set DATA cluster.quorum-count 2
gluster volume set DATA cluster.eager-lock on
gluster volume set DATA network.remote-dio enable
gluster volume set DATA cluster.eager-lock enable
gluster volume set DATA performance.stat-prefetch off
gluster volume set DATA performance.io-cache off
gluster volume set DATA performance.read-ahead off
gluster volume set DATA performance.quick-read off
gluster volume set DATA performance.readdir-ahead on

完成之後進入Web GUI 儲存新增 GlusterFS 即可使用

新增儲存池時,需要手動打儲存池名稱以及在當台server/second server順序不然會掛載不起來:

eg.在R730上面,輸入上如圖。而到了R230上面,兩台的順序要交換打。

阅读剩余
THE END