GlusterFS multiple nodes In Centos/Almalinux

Introduction

GlusterFS is a scalable filesystem through a network suitable for data-intensive. Tasks such as cloud storage and media streaming. GlusterFS is open-source software and can utilize standard off-the-shelf hardware. All Glusterfs document link. Check iscsi tutorial on centos8. It is cost-efficient and can be deployed on bare metal, virtual, container, and cloud environments.

Enterprises can be scalable, performance, and available on-demand, with no vendor lock-in, across on-premise, public cloud, and hybrid environments. Gluster is used in production at thousands of organizations spanning media, healthcare, government, education, web 2.0, and financial services.

This tutorial is intended to provide a step-by-step guide to setting up GlusterFS for the first time with the minimum degree of complexity. For this guide, it is required to use virtual machine instances.

Advantages

  • Scales to several petabytes
  • Handles thousands of clients
  • POSIX compatible
  • Uses commodity hardware
  • Can use any ondisk filesystem that supports extended attributes
  • Accessible using industry standard protocols like NFS and SMB
  • Provides replication, quotas, geo-replication, snapshots and bitrot detection
  • Allows optimization for different workloads
  • Open Source

Enable GFS repository on centos8

Execute the command below to enable the GlusterFS repository

# yum-config-manager --enable powertools --enable devel
# dnf -y install centos-release-gluster8

Install dependencies

Add hostname and ip addreses on host file

# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
8
192.168.56.101 master8.unixcop.com master8
192.168.56.202 worker18.unixcop.com worker1
192.168.56.203 worker28.unixcop.com worker2

Install GFS package

Follow command below

# dnf install glusterfs-server -y

Add firewall rules to allow connection to all nodes

# firewall-cmd --add-service=glusterfs
# firewall-cmd --reload

Disable Selinux

# sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /etc/selinux/config
# setenforce 0

Start GlusterFS service

Follow the command below as follows. Please note if you get error /usr/lib/systemd/system/glusterd.service:21: Unknown lvalue ‘StartLimitIntervalSec’ in section ‘Service’. Change the value to 10.

#sudo systemctl start glusterd

#sudo systemctl enable glusterd

Now probe all nodes to be added to GlusterFS cluster

Execute the command below.

# gluster peer probe worker1
# gluster peer probe worker2
# gluster peer probe worker3

Check the status

Check the status of the connected nodes.

Create a new directory for GlusterFS (on both worker1 and worker2)

Directory created, we can now create the volume (named v01) that will replicate on both worker1 and worker2

# mkdir -p /glusterfs/distributed

Add GFS nodes to distributed

Please execute the command below.

# # gluster volume create vol_distributed transport tcp worker1:/glusterfs/distributed worker2:/glusterfs/distributed force

Check nodes connected to cluster

Follow the command below.

# gluster pool list

Start GFS filesystem

Please use the command below.

# gluster volume start vol_distributed

Check info of the Glusterfs cluster

Follow the commands below.

# gluster volume info

Conclusion

Please check the advantages and disadvantages of a distributed file system in comparison to traditional network memory in the table below.

Advantages

Good utilization of existing capacities
Increased reliability
Network load distribution
Very good scalability

Disadvatages

Creation of a complex network structure
Increased administrative effort during set-up
Quick network infrastructure is needed
The additional effort required for technical security

Melhttps://unixcop.com
Unix/Linux Guru and FOSS supporter

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

You might also likeRELATED

How to Install and Configure VNC on Ubuntu Server 20.04

This article will show you how to set up a VNC on Ubuntu Server 20.04. Virtual Network Computing (VNC) is a graphical desktop sharing technology...

How to Export Your Servers Logs with Rsyslog in Centos 8

In this post, you will learn how to Export Your Servers Logs with Rsyslog in Centos 8 In this article, we'll walk through setting up...

How To Setup a Counter Strike: Global Offensive Server on CentOS 8

Counter-Strikes first option is a feature called "Official Matchmaking." This selects a Steam-owned server near you where you can play against players from all...