High-Availability Storage With GlusterFS On Ubuntu 18.04 LTS
High-Availability Storage With GlusterFS On Ubuntu 18.04 LTS ===> https://tinurll.com/2tvVKM
How to Set Up High-Availability Storage with GlusterFS on Ubuntu 18.04 LTS
GlusterFS is a distributed file system that allows you to create a scalable and reliable storage cluster using commodity hardware. GlusterFS can replicate data across multiple nodes, ensuring high availability and fault tolerance. In this tutorial, you will learn how to set up a GlusterFS cluster on Ubuntu 18.04 LTS using three servers.
Prerequisites
Before you begin, you will need the following:
Three Ubuntu 18.04 LTS servers with root access. In this tutorial, we will use the following hostnames and IP addresses:
gluster1: 192.168.0.10
gluster2: 192.168.0.11
gluster3: 192.168.0.12
A domain name or a subdomain that points to one of the servers. In this tutorial, we will use the domain name example.com.
A firewall that allows SSH (port 22), GlusterFS (port 24007), and NFS (port 2049) traffic.
Step 1: Installing GlusterFS on All Servers
The first step is to install GlusterFS on all three servers. You can do this by adding the official GlusterFS PPA repository and installing the glusterfs-server package:
sudo add-apt-repository ppa:gluster/glusterfs-6
sudo apt update
sudo apt install glusterfs-server
This will install the latest version of GlusterFS (6.x) and start the glusterd service automatically. You can verify that the service is running by typing:
sudo systemctl status glusterd
You should see something like this:
â glusterd.service - GlusterFS, a clustered file-system server
Loaded: loaded (/lib/systemd/system/glusterd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2023-04-20 02:35:43 UTC; 5min ago
Docs: man:glusterd(8)
Main PID: 1234 (glusterd)
Tasks: 10 (limit: 4915)
CGroup: /system.slice/glusterd.service
ââ1234 /usr/sbin/glusterd -p /var/run/glusterd.pid --log-level INFO
Apr 20 02:35:43 gluster1 systemd[1]: Starting GlusterFS, a clustered file-system server...
Apr 20 02:35:43 gluster1 systemd[1]: Started GlusterFS, a clustered file-system server.
Repeat this step on all three servers.
Step 2: Configuring Hosts File on All Servers
The next step is to configure the hosts file on all three servers so that they can communicate with each other by hostname. You can do this by editing the /etc/hosts file and adding the following lines:
192.168.0.10 gluster1
192.168.0.11 gluster2
192.168.0.12 gluster3
This will map the IP addresses to the hostnames of the servers. Save and close the file when you are done.
Repeat this step on all three servers.
Step 3: Creating a Trusted Pool of Servers
The next step is to create a trusted pool of servers by adding each server to the cluster using the gluster peer probe command. You can do this from any one of the servers, but we will use gluster1 as an example:
sudo gluster peer probe gluster2
sudo gluster peer probe gluster3
This will send a probe request to the other servers and establish a connection between them. You should see something like this:
peer probe: success.
You can verify that the servers are in the same aa16f39245