Atlantic.Net Blog

How to Install and Configure GlusterFS on CentOS 7/CentOS 8

Andrew Mora
by Atlantic.Net (6 posts) under VPS Hosting
0 Comments
Verified and Tested 03/10/21

Introduction

Quick installation of GlusterFS on Centos 7.x and 8.x. GlusterFS clusters together storage building blocks over Infiniband RDMA or TCP/IP interconnect, aggregating disk and memory resources and managing data in a single global namespace.

Prerequisites

You’ll need a separate hard disk(s) or virtual disk(s) to use as glusterfs storage mount point(s).

Installing and Configuring GlusterFS on CentOS 7

Install XFS file system

yum install xfsprogs -y

Install and Enable GlusterFS official repository

yum -y install centos-release-gluster40
sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/CentOS-Gluster-4.1.repo

Install GlusterFS via YUM

 yum --enablerepo=centos-gluster41 -y install glusterfs-server

Partition, format and mount your GlusterFS Volume. In this case our “extra harddisk/virtual disk” is /dev/sdb/. NOTE: I will not be going into detail about how to partition your harddisk, as it is out of the scope of this article. We will be using the FDISK utility to partition /dev/sdb. Also note that you may choose your partitioning scheme as you please. For the sake of simplicity, we’ll be creating a single large partition /deb/sdb1

fdisk /dev/sdb
Sample Fdisk Operation

Sample Fdisk Operation

Create a new Primary or extended partition, write it to the disk and exit the FDISK utility.

Proceed to format the disk in XFS.

mkfs.xfs /dev/sdb1 -f

Add your new disk to /etc/fstab so that the disk is mounted at boot time

echo "/dev/sdb1 /export/brick1 xfs defaults 1 2" >> /etc/fstab
mount -a && mount

Start the GlusterFS daemon and make sure it starts upon boot time.

systemctl start glusterd
systemctl enable glusterd

Now, verify the GlusterFS version with the following command:

gluster --version

Output:

glusterfs 4.1.9
Repository revision: git://git.gluster.org/glusterfs.git
Copyright (c) 2006-2016 Red Hat, Inc. <https://www.gluster.org/>
GlusterFS comes with ABSOLUTELY NO WARRANTY.
It is licensed to you under your choice of the GNU Lesser
General Public License, version 3 or any later version (LGPLv3
or later), or the GNU General Public License, version 2 (GPLv2),
in all cases as published by the Free Software Foundation.

Installing and Configuring GlusterFS on CentOS 8

Install XFS file system

dnf install xfsprogs -y

Install and Enable GlusterFS official repository

dnf -y install centos-release-gluster8
sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/CentOS-Gluster-8.repo

Install GlusterFS via DNF

dnf --enablerepo=centos-gluster8,PowerTools -y install glusterfs-server

Partition, format and mount your GlusterFS Volume. In this case our “extra harddisk/virtual disk” is /dev/sdb/. NOTE: I will not be going into detail about how to partition your harddisk, as it is out of the scope of this article. We will be using the FDISK utility to partition /dev/sdb. Also note that you may choose your partitioning scheme as you please. For the sake of simplicity, we’ll be creating a single large partition /deb/sdb1

fdisk /dev/sdb
Sample Fdisk Operation

Sample Fdisk Operation

Create a new Primary or extended partition, write it to the disk and exit the FDISK utility.

Proceed to format the disk in XFS.

 mkfs.xfs /dev/sdb1 –f

Add your new disk to /etc/fstab so that the disk is mounted at boot time

echo "/dev/sdb1 /export/brick1 xfs defaults 1 2" >> /etc/fstab
mount -a && mount

Start the GlusterFS daemon and make sure it starts upon boot time.

systemctl start glusterd
systemctl enable glusterd

Now, verify the GlusterFS version with the following command:

gluster --version

Output:

glusterfs 8.3
Repository revision: git://git.gluster.org/glusterfs.git
Copyright (c) 2006-2016 Red Hat, Inc. <https://www.gluster.org/>
GlusterFS comes with ABSOLUTELY NO WARRANTY.
It is licensed to you under your choice of the GNU Lesser
General Public License, version 3 or any later version (LGPLv3
or later), or the GNU General Public License, version 2 (GPLv2),
in all cases as published by the Free Software Foundation.

Congratulations you have installed and configured GlusterFS on CentOS 7 and CentOS 8. We hope this article assisted you with the process. Thank you for following this How-To, check back for updates and more interesting Centos how-to’s or learn more about our reliable VPS hosting solutions.

Get A Free To Use Cloud VPS

Free Tier Includes:
G3.2GB Cloud VPS Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


Looking for a Hosting Solution?

We Provide Cloud, Dedicated, & Colocation.

  • Seven Global Data Center Locations.
  • Flexible Private, Public, & Hybrid Hosting.
  • 24x7x365 Security, Support, & Monitoring.
Contact Us Now! Med Tech Award FTC
SOC Audit HIPAA Audit HITECH Audit

Recent Posts

Top 10 Best Cybersecurity Training Services
How to Install Ansible on Oracle Linux 8
How to Install LEMP Server on Oracle Linux 8
How to Install and Configure Apache Webserver on Oracle Linux 8
How to Install and Configure Nginx Webserver on Oracle Linux 8

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G3.2GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2008 Lookout Dr,

Dallas, Texas 75044

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4

Canada

London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom

Resources