GlusterFS

GlusterFS is a distributed file system, to be precise it is a scalable network filesystem. Using common off-the-shelf hardware, you can create large, distributed storage solutions for media streaming, data analysis, and other data- and bandwidth-intensive tasks. GlusterFS is free and open source software. In order to create a fail safe distributed storage a distributed file system is a necessity. GlusterFS combines the memory and processing power of two machines and their individual discs to form a volume that can be accessed by clients.

This post will cover basic steps to install GlusterFS on Fedora 23

Installing the prerequisites

dnf install gcc
dnf install flex bison
dnf install libacl-devel.x86_64
dnf install userspace-rcu-devel.x86_64
dnf install openssl-devel.x86_64
dnf install sqlite-devel.x86_64
dnf install libxml2-devel.x86_64

Downloading And Installing GlusterFS source

wget http://download.gluster.org/pub/gluster/glusterfs/LATEST/glusterfs-3.7.6.tar.gz
tar -xvzf glusterfs-3.7.6.tar.gz
cd glusterfs-3.7.6
./configure
make
make install

Starting the Gluster Service source

service glusterd start
chkconfig glusterd on

Creating GlusterFS Volumes source

Let the IP’s of machines be 192.168.229.156 and 192.168.229.157

gluster peer probe 192.168.229.156
gluster peer status
mkdir /gluster/nas
gluster volume create nas replica 2 192.168.229.156:/gluster/nas 192.168.229.157:/gluster/nas
mkdir /gluster/nas
gluster volume create nas replica 2 192.168.229.156:/gluster/nas 192.168.229.257:/gluster/nas
mkdir /gluster/ctdb force
gluster volume create ctdb 192.168.229.156:/gluster/ctdb 192.168.229.257:/gluster/ctdb force
gluster volume start nas
gluster volume start ctdb
mkdir /gluster/data
mkdir /gluster/lock
mount -t glusterfs 192.168.229.156:/ctdb /gluster/lock/
mount -t glusterfs 192.168.229.156:/nas /gluster/data/
df -h