GlusterFS is an open-source, scale-out network-attached storage filesystem that aggregates storage from multiple servers into a single, unified namespace. It supports replication, distribution, and striping, making it suitable for workloads that require high availability or large aggregate capacity without specialized hardware. On RHEL 8, GlusterFS packages are available through the CentOS Storage SIG repository, allowing straightforward installation using dnf. This tutorial covers installing GlusterFS on two nodes, creating a replicated volume, and mounting it on a client system.

Prerequisites

  • Two RHEL 8 servers to act as GlusterFS peers (referred to as node1 and node2), each with a dedicated disk or partition for bricks
  • A third RHEL 8 client system, or one of the nodes can serve as the client
  • Hostnames or IP addresses resolvable between all nodes (add entries to /etc/hosts if DNS is unavailable)
  • Root or sudo access on all systems
  • Ports 24007, 24008, and 49152+ open between nodes in the firewall

Step 1 — Install GlusterFS Server on Both Nodes

Enable the CentOS Storage SIG repository to access GlusterFS packages, then install the server package and enable the daemon on both node1 and node2. Run these commands on each node.

dnf install -y centos-release-gluster
dnf install -y glusterfs-server
systemctl enable --now glusterd
systemctl status glusterd

Step 2 — Configure the Firewall on Both Nodes

GlusterFS requires ports 24007 and 24008 for cluster management traffic, plus a range of ports starting at 49152 for individual brick processes. Open these on both nodes. The number of brick ports needed equals the number of bricks hosted on the node.

firewall-cmd --permanent --add-port=24007-24008/tcp
firewall-cmd --permanent --add-port=49152-49251/tcp
firewall-cmd --reload
firewall-cmd --list-ports

Step 3 — Prepare Brick Directories and Probe Peers

Create the directories that will serve as brick mount points on each node. GlusterFS best practice is to use a separate XFS filesystem for each brick rather than a directory on the root filesystem. After preparing the directories, run gluster peer probe from node1 to add node2 to the trusted storage pool.

# Run on BOTH node1 and node2:
mkfs.xfs /dev/sdb
mkdir -p /gluster/brick1
echo '/dev/sdb /gluster/brick1 xfs defaults 0 0' >> /etc/fstab
mount -a
mkdir -p /gluster/brick1/data

# Run only on node1:
gluster peer probe node2
gluster peer status

Step 4 — Create and Start the Replicated GlusterFS Volume

From node1, create a replicated volume named myvol using a brick from each node. The replica 2 option mirrors all data across both nodes for high availability. After creation, start the volume and verify its status.

gluster volume create myvol replica 2 node1:/gluster/brick1/data node2:/gluster/brick1/data force
gluster volume start myvol
gluster volume status myvol
gluster volume info myvol

Step 5 — Mount the GlusterFS Volume on a Client

Install the GlusterFS client package on the client machine, then mount the volume using the glusterfs filesystem type. Specify either node as the server in the mount path — GlusterFS handles failover automatically. Add the entry to /etc/fstab for persistence.

dnf install -y glusterfs glusterfs-fuse

mkdir -p /mnt/glusterfs
mount -t glusterfs node1:/myvol /mnt/glusterfs
df -h /mnt/glusterfs

# Add to /etc/fstab:
echo 'node1:/myvol /mnt/glusterfs glusterfs defaults,_netdev 0 0' >> /etc/fstab

Step 6 — Expand the Volume and Monitor Health

GlusterFS volumes can be expanded non-disruptively by adding more bricks. When adding bricks to a replicated volume, add them in multiples of the replica count. Use gluster volume heal to repair any inconsistencies between replicas.

# Add a new brick pair to expand storage (requires node3 configured as a peer):
gluster peer probe node3
gluster volume add-brick myvol replica 2 node3:/gluster/brick1/data force

# Check heal status and volume health:
gluster volume heal myvol info
gluster volume status myvol detail
gluster volume quota myvol list

Conclusion

You have deployed a two-node replicated GlusterFS volume on RHEL 8 and mounted it on a client using the native FUSE client. Your data is now mirrored across both storage nodes, providing resilience against single-node failures. The volume can be expanded online by adding additional peer nodes and bricks without unmounting or interrupting client access. GlusterFS integrates well with Kubernetes via the Heketi REST API, making it a viable storage backend for container workloads as well.

Next steps: How to Set Up Ceph Storage on RHEL 8, How to Configure NFS-Ganesha with GlusterFS on RHEL 8, and How to Monitor GlusterFS with Prometheus and Grafana.