How to install glusterfs on CentOS 7
In this tutorial, I will show you how to install glusterfs on centos 7 / Redhat 7.
GlusterFS is a scalable network filesystem suitable for data-intensive tasks such as cloud storage and media streaming. GlusterFS is free and open source software and can utilize common off-the-shelf hardware. To learn more, please see the Gluster project home page.
Since Gluster can be used in different ways and for different tasks, it would be difficult to explain everything at once. We recommend that you follow the Quick Start Guide first. By utilizing a number of virtual machines, you will create a functional test setup to learn the basic concepts.
Install glusterfs repo and glusterfs package on all nodes
yum install -y centos-release-gluster
yum install -y glusterfs-server
Read Also: How to install Postgres 9.6 on CentOS 7
systemctl start glusterd.service
systemctl enable glusterd.service
Read Also: How to install Postgres 9.6 on mac
We need to allow glusterfs to communicate with clients so allow glusterfs service in firewall:
firewall-cmd --permanent --add-service=glusterfs
We want to mount the glusterfs volume on the clients so we need to install nfs package on client because glusterfs supports NFSv3..
yum -y install rpcbind
Start the Services of rpcbind
systemctl enable rpcbind
systemctl start rpcbind
systemctl restart glusterd
Now add the clients in hosts file
Change the ipaddress and name with yours and add the following line in hosts file
Create a Directory for glusterFS Volume
I have two disks mounted on my VM on /volume
Now search for the client from master host
gluster peer probe node02
Then check the status
gluster peer status
Create a volume
gluster volume create test transport tcp node02:/volume/share
Start the volume
gluster volume start
Check volume status
It show info about all the volumes present
gluster volume info
If you got any problem using this tutorial feel free to comment below..
Leave a Reply