Server hosts

  • 103.43.47.x - glusterfs01.darin.web.id - (CentOS 7)
  • 103.43.47.x - glusterfs02.darin.web.id - (CentOS 7)
  • 103.43.47.x - glusterfs03.darin.web.id - (CentOS 7)

Server configuration

Update server

yum -y update && upgrade;
yum clean all; yum autoremove

Stop & disable firewall

systemctl stop iptables
systemctl stop firewalld
systemctl disable iptables
systemctl disable firewalld

Install GlusterFS-server

yum -y install centos-release-gluster
yum -y install glusterfs-server

Start GlusterFS service

systemctl start glusterd
systemctl enable glusterd

Create hosts file

cat >> /etc/hosts
103.43.47.x glusterfs01.darin.web.id
103.43.47.x glusterfs02.darin.web.id
103.43.47.x glusterfs03.darin.web.id

Create mount-point

mkdir /mnt/folder

Combine disk (just running in glusterfs01.darin.web.id)

gluster peer storage glusterfs02.darin.web.id
gluster peer storage glusterfs03.darin.web.id
peer probe: success

Created shared volume (just running in glusterfs01.darin.web.id)

gluster volume create volume-name transport tcp glusterfs01.darin.web.id:/mnt/folder glusterfs02.darin.web.id:/mnt/folder glusterfs03.darin.web.id:/mnt/folder
volume create: storage: success: please start the volume to access data
gluster volume start volume-name
gluster volume status volume-name

Client configuration (Mounting shared volume using Gluster Native Client)

Update client

yum -y update && upgrade;
yum clean all; yum autoremove

Stop & disable firewall

systemctl stop iptables
systemctl stop firewalld
systemctl disable iptables
systemctl disable firewalld

Create hosts file

cat >> /etc/hosts
103.43.47.x glusterfs01.darin.web.id
103.43.47.x glusterfs02.darin.web.id
103.43.47.x glusterfs03.darin.web.id

Install requirements package

yum -y install wget fuse fuse-libs openib libibverbs

Download and install the latest glusterfs, glusterfs-fuse, and glusterfs-rdma RPM files to each client

The glusterfs package contains the Gluster Native Client
The glusterfs-fuse package contains the FUSE translator required for mounting on client systems
The glusterfs-rdma packages contain OpenFabrics verbs RDMA module for Infiniband

http://www.gluster.org/download/

wget https://buildlogs.centos.org/centos/7/storage/x86_64/gluster-3.8/glusterfs-3.8.15-2.el7.x86_64.rpm
wget https://buildlogs.centos.org/centos/7/storage/x86_64/gluster-3.8/glusterfs-fuse-3.8.15-2.el7.x86_64.rpm
wget https://buildlogs.centos.org/centos/7/storage/x86_64/gluster-3.8/glusterfs-rdma-3.8.15-2.el7.x86_64.rpm
wget https://buildlogs.centos.org/centos/7/storage/x86_64/gluster-3.8/glusterfs-libs-3.8.15-2.el7.x86_64.rpm
wget https://buildlogs.centos.org/centos/7/storage/x86_64/gluster-3.8/glusterfs-client-xlators-3.8.15-2.el7.x86_64.rpm

rpm -i glusterfs-3.8.15-2.el7.x86_64.rpm
rpm -i glusterfs-fuse-3.8.15-2.el7.x86_64.rpm
rpm -i glusterfs-libs-3.8.15-2.el7.x86_64.rpm
rpm -i glusterfs-client-xlators-3.8.15-2.el7.x86_64.rpm
rpm -i glusterfs-rdma-3.8.15-2.el7.x86_64.rpm

Mounting Volumes

mkdir /data
mount -t glusterfs HOSTNAME-OR-IPADDRESS:/VOLNAME MOUNTDIR
mount -t glusterfs 103.43.47.x:/glusterstorage /data
mount -t gluster fs glusterfs01.darin.web.id :/glusterstorage /data

Cluster verification and test from client

cd /data
touch file{1..1000}
check whether file exist in every node or not