Gluster over ZFS - LinuxUserGroupUWSP/RackMesa GitHub Wiki
Install ZFS
yum install -y http://download.zfsonlinux.org/epel/zfs-release.el7_3.noarch.rpm
gpg --quiet --with-fingerprint /etc/pki/rpm-gpg/RPM-GPG-KEY-zfsonlinux
yum install -y epel-release kernel-devel
yum install -y zfs
Install GlusterFS
yum install -y centos-release-gluster39
yum install -y glusterfs gluster-cli glusterfs-libs glusterfs-server
Create a storage pool and file system
modprobe zfs
zpool create gfs1 [LOCAL_DRIVE_1] [LOCAL_DRIVE_N]
zfs create gfs1/cs_primary
Mount ZFS to local OS
mkdir -p /bricks/cs_primary
zfs set mountpoint=/bricks/cs_primary gfs1/cs_primary
zfs set canmount=on gfs1/cs_primary
zfs mount gfs1/cs_primary
Open ports 24007 and 24008 for GlusterFS management and 24009 for cs_gfs_primary1
firewall-cmd --zone=public --add-port=24007-24009/tcp --permanent
firewall-cmd --reload
Add peers to Gluster cluster
systemctl start glusterd
gluster peer probe [HOST1]
gluster peer probe [HOSTN]
Create cs_gfs_primary1 GFS volume. Set to replicate twice. Goes over TCP.
mkdir /bricks/cs_primary/data
gluster volume create cs_gfs_primary1 replica 2 transport tcp [HOST1]:/bricks/cs_primary/data [HOSTN]:/bricks/cs_primary/data
Start the volume
gluster volume start cs_gfs_primary1
Configure clients
yum install -y glusterfs glusterfs-fuse attr
mkdir /cs_gfs_primary1
mount -t glusterfs 10.0.0.5:/cs_gfs_primary1
vi /etc/fstab
10.0.0.5:/cs_gfs_primary1 /cs_gfs_primary1 glusterfs defaults,_netdev 0 0