How to Install and Configure GlusterFS on Ubuntu 24.04
How to Install and Configure GlusterFS on Ubuntu 24.04
Updated: June 2025
Introduction
GlusterFS is a scalable, distributed file system designed to handle large amounts of data across multiple storage servers. In this guide, we’ll walk through the installation and configuration of GlusterFS on Ubuntu 24.04.
Prerequisites
- Two or more Ubuntu 24.04 servers
- Root or sudo access
- Proper DNS or /etc/hosts setup for all nodes
- All servers should have static IP addresses
Step 1: Update All Nodes
sudo apt update && sudo apt upgrade -y
Step 2: Install GlusterFS Server on All Nodes
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:gluster/glusterfs-11
sudo apt update
sudo apt install -y glusterfs-server
sudo systemctl enable --now glusterd
Step 3: Configure Hostnames or /etc/hosts
Ensure all nodes can resolve each other by hostname or edit the /etc/hosts
file on each node:
192.168.1.10 node1
192.168.1.11 node2
Step 4: Probe Peers
Run this on node1
to add node2
to the trusted pool:
sudo gluster peer probe node2
Check status:
sudo gluster peer status
Step 5: Create a GlusterFS Volume
On both nodes, create a brick directory:
sudo mkdir -p /glusterfs/brick1
Then, on node1
, create the volume:
sudo gluster volume create gv0 replica 2 \
node1:/glusterfs/brick1/gv0 \
node2:/glusterfs/brick1/gv0
Start the volume:
sudo gluster volume start gv0
Step 6: Mount the GlusterFS Volume
Install GlusterFS client:
sudo apt install -y glusterfs-client
Mount the volume:
sudo mkdir /mnt/gv0
sudo mount -t glusterfs node1:/gv0 /mnt/gv0
To mount automatically on boot, add this to /etc/fstab
:
node1:/gv0 /mnt/gv0 glusterfs defaults,_netdev 0 0
Conclusion
GlusterFS is now successfully installed and running. You have created a replicated volume and mounted it on your system. You can now start storing and accessing distributed data easily and securely.
Need fast and reliable Linux servers? Check out our VPS Linux offer from NETCLOUD24.
Comments
Post a Comment