GlusterFS is a scalable, distributed file system suitable for various types of storage needs. It can be installed on Red Hat Enterprise Linux (RHEL), CentOS, and Fedora using the default dnf or yum repositories. While these repositories provide stable versions, they may not always contain the latest releases. To access the most up-to-date packages, it is recommended to use the CentOS Storage SIG repository.

Before installing GlusterFS, it’s crucial to ensure the appropriate version of the repository is available for your system. The CentOS Storage SIG repository provides several GlusterFS versions, which include important libraries and tools required for optimal performance. Adding this repository ensures you can install newer releases and their corresponding dependencies without manual configuration.

Once installed, GlusterFS requires some additional configuration to enable communication between nodes. You need to configure the system firewall to allow traffic on GlusterFS ports. Additionally, enabling and starting the glusterd service ensures that the distributed file system is operational and ready for cluster configuration.

Steps to install GlusterFS on RHEL, CentOS, or Fedora:

  1. Launch terminal.
  2. Check for available GlusterFS repositories.
    $ sudo dnf search gluster
    [sudo] password for user: 
    Last metadata expiration check: 23:20:40 ago on Fri 07 May 2021 08:01:41 AM +08.
    =========================== Name & Summary Matched: gluster ===========================
    centos-release-gluster6.noarch : Gluster 6 packages from the CentOS Storage SIG
                                   : repository
    centos-release-gluster7.noarch : Gluster 7 packages from the CentOS Storage SIG
                                   : repository
    centos-release-gluster8.noarch : Gluster 8 packages from the CentOS Storage SIG
                                   : repository
    glusterfs-api.x86_64 : GlusterFS api library
    glusterfs-cli.x86_64 : GlusterFS CLI
    glusterfs-client-xlators.x86_64 : GlusterFS client-side translators
    glusterfs-libs.x86_64 : GlusterFS common libraries
    glusterfs-rdma.x86_64 : GlusterFS rdma support for ib-verbs
    libvirt-daemon-driver-storage-gluster.x86_64 : Storage driver plugin for gluster
    pcp-pmda-gluster.x86_64 : Performance Co-Pilot (PCP) metrics for the Gluster filesystem
    qemu-kvm-block-gluster.x86_64 : QEMU Gluster block driver
    ================================ Name Matched: gluster ================================
    glusterfs.x86_64 : Distributed File System
    glusterfs-fuse.x86_64 : Fuse client
  3. Add latest GlusterFS repository.
    $ sudo dnf install --assumeyes centos-release-gluster
    Last metadata expiration check: 23:22:15 ago on Fri 07 May 2021 08:01:41 AM +08.
    Dependencies resolved.
    =======================================================================================
     Package                             Architecture Version           Repository    Size
    =======================================================================================
    Installing:
     centos-release-gluster8             noarch       1.0-1.el8         extras       9.3 k
    Installing dependencies:
     centos-release-storage-common       noarch       2-2.el8           extras       9.4 k
    
    Transaction Summary
    =======================================================================================
    Install  2 Packages
    
    Total download size: 19 k
    Installed size: 2.4 k
    ##### snipped

    This will install the CentOS Storage Special Interest Group (SIG) yum repository which provides the latest GlusterFS software packages.

  4. Install glusterfs server and related packages.
    $ sudo dnf install --assumeyes glusterfs glusterfs-server
    CentOS-8 - Gluster 8                                    92 kB/s |  50 kB     00:00    
    Package glusterfs-6.0-49.1.el8.x86_64 is already installed.
    Dependencies resolved.
    =======================================================================================
     Package                      Arch       Version             Repository           Size
    =======================================================================================
    Installing:
     glusterfs-server             x86_64     8.4-1.el8           centos-gluster8     1.4 M
    Upgrading:
     glusterfs                    x86_64     8.4-1.el8           centos-gluster8     689 k
     glusterfs-cli                x86_64     8.4-1.el8           centos-gluster8     214 k
     glusterfs-client-xlators     x86_64     8.4-1.el8           centos-gluster8     899 k
    Installing dependencies:
     glusterfs-fuse               x86_64     8.4-1.el8           centos-gluster8     171 k
     libgfapi0                    x86_64     8.4-1.el8           centos-gluster8     125 k
         replacing  glusterfs-api.x86_64 6.0-49.1.el8
     libgfchangelog0              x86_64     8.4-1.el8           centos-gluster8      67 k
         replacing  glusterfs-libs.x86_64 6.0-49.1.el8
     libgfrpc0                    x86_64     8.4-1.el8           centos-gluster8      89 k
         replacing  glusterfs-libs.x86_64 6.0-49.1.el8
     libgfxdr0                    x86_64     8.4-1.el8           centos-gluster8      61 k
         replacing  glusterfs-libs.x86_64 6.0-49.1.el8
     libglusterd0                 x86_64     8.4-1.el8           centos-gluster8      45 k
         replacing  glusterfs-libs.x86_64 6.0-49.1.el8
     libglusterfs0                x86_64     8.4-1.el8           centos-gluster8     350 k
         replacing  glusterfs-libs.x86_64 6.0-49.1.el8
     python3-pyxattr              x86_64     0.5.3-18.el8        centos-gluster8      35 k
    
    Transaction Summary
    =======================================================================================
    Install  9 Packages
    Upgrade  3 Packages
    
    Total download size: 4.1 M
    ##### snipped
  5. Allow network access for GlusterFS service.
    $ sudo firewall-cmd --zone=public --add-service=glusterfs --permanent
    success

    This will enable access to 5667/tcp and is similar to running the following command:

    $ sudo firewall-cmd --zone=public --add-port=5667/tcp --permanent 
  6. Reload firewall to activate changes.
    $ sudo firewall-cmd --reload
    success
  7. Enable automatic startup of glusterd service.
    $ sudo systemctl enable glusterd
  8. Start the glusterd service.
    $ sudo systemctl start glusterd 
  9. Start creating GlusterFS cluster.
Discuss the article:

Comment anonymously. Login not required.