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

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

1 COMMENT

  1. hello,
    i want to ask, how to upgrade glusterfs-client from 3.8.8 to the latest version on debian 9.12 ? or if can’t to the latest version maybe down beloow the latest ..

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook