Building GlusterFS - linux-on-ibm-z/docs GitHub Wiki

Building GlusterFS

Following versions of GlusterFS are available in respective distributions at the time of creation of these build instructions:

  • RHEL (8.10, 9.6, 9.7) have 6.0
  • SLES 15 SP7 has 11.2
  • Ubuntu 22.04 has 10.1
  • Ubuntu 24.04 has 11.1

The instructions provided below specify the steps to build or install GlusterFS 11.2 on Linux on IBM Z for following distributions:

  • RHEL (8.10, 9.6, 9.7)
  • Ubuntu (22.04, 24.04)

Note: For Ubuntu (22.04, 24.04), please refer to this link to install GlusterFS from the community GlusterFS PPA (ppa:gluster/glusterfs-11).

General Notes:

  • When following the steps below please use a super user unless otherwise specified
  • A directory /<source root>/ will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it

1. Build and Install GlusterFS

1.1. Build using script

If you want to build GlusterFS using manual steps, go to Step 1.2.

Use the following commands to build GlusterFS using the build script. Please make sure you have wget installed.

wget -q https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/GlusterFS/11.2/build_glusterfs.sh
# Build GlusterFS
bash build_glusterfs.sh    [Provide -h option to check usage,  -t for executing build with tests]

If the build completes successfully, go to STEP 3. In case of error, check logs for more details or go to STEP 1.2 to follow manual build steps.

1.2. Install the dependencies

  • Set environment variables:

    export SOURCE_ROOT=/<source_root>/
    export PREFIX=/usr/local
    export PATCH_URL=https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/GlusterFS/11.2/patch
    
    PATH=${PREFIX}/bin:${PREFIX}/sbin${PATH:+:${PATH}}
    export PATH
    
    PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig:${PREFIX}/lib64/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}
    export PKG_CONFIG_PATH
    
    LD_LIBRARY_PATH=${PREFIX}/lib:${PREFIX}/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
    export LD_LIBRARY_PATH
    
    LD_RUN_PATH=${PREFIX}/lib:${PREFIX}/lib64${LD_RUN_PATH:+:${LD_RUN_PATH}}
    export LD_RUN_PATH
    
  • RHEL 8.10

    yum install -y curl autoconf automake bison dos2unix flex fuse-devel glib2-devel libacl-devel libaio-devel libattr-devel libcurl-devel libibverbs-devel librdmacm-devel libtirpc-devel libuuid-devel libtool libxml2-devel make openssl-devel pkgconfig xz-devel  python3-devel python3-netifaces  readline-devel rpm-build sqlite-devel systemtap-sdt-devel tar git lvm2-devel python3-paste-deploy python3-simplejson python3-sphinx python3-webob python3-pyxattr userspace-rcu-devel rpcgen liburing-devel gperf gperftools-devel
    
  • RHEL (9.6, 9.7)

    yum install -y curl autoconf automake bison dos2unix flex fuse-devel glib2-devel libacl-devel libaio-devel libattr-devel libcurl-devel libibverbs-devel librdmacm-devel libtirpc-devel libuuid-devel libtool libxml2-devel make openssl-devel pkgconfig xz-devel  python3-devel python3-netifaces  readline-devel rpm-build sqlite-devel systemtap-sdt-devel tar git lvm2-devel python3-paste-deploy python3-simplejson python3-sphinx python3-webob python3-pyxattr userspace-rcu-devel rpcgen liburing-devel gperf gperftools-devel iproute
    

1.3. Build and install dependencies

  • Install GCC 11

    • RHEL 8.10
      yum install -y gcc-toolset-11-gcc-c++
      scl enable gcc-toolset-11 bash
      

1.4. Download, Configure and Build GlusterFS

cd $SOURCE_ROOT
git clone https://github.com/gluster/glusterfs
cd glusterfs
git checkout v11.2
curl -sSL $PATCH_URL/UB22RHEL9.patch | git apply ##For RHEL 9.x and Ubuntu 22.04
curl -sSL $PATCH_URL/UB24.patch | git apply ##For Ubuntu 24.04
curl -sSL $PATCH_URL/RHEL8.patch | git apply ##For RHEL 8.10
./autogen.sh
./configure CFLAGS="-DUSE_URCU_QSBR" --enable-debug --enable-gnfs --without-tcmalloc  ## for Ub22.04 and Ub24.04
./configure --enable-debug --enable-gnfs --without-tcmalloc  ##For RHEL 8.x, 9.x
make 
make install

Note : If git clone fails with SSL certificate issue, execute git config --global http.sslVerify false command and then do git clone.

2. Run the test cases (optional)

2.1. Install the testing dependencies

  • RHEL (8.10, 9.6, 9.7)
    yum install -y dbench perl-Test-Harness yajl net-tools psmisc nfs-utils xfsprogs attr procps-ng gdb python3
    pip3 install prettytable
    

2.2. Run tests

  • Apply patches

    The following patch fixes the test case ./tests/00-geo-rep/00-georep-verify-non-root-setup.t (For RHEL 8.x, RHEL 9.x)

    ## For RHEL 8.x
    ssh-keygen -t rsa -b 4096
    ln -s /usr/local/lib/libgfchangelog.so.0 /lib64/libgfchangelog.so
    ldconfig /usr/local/lib
    ldconfig /usr/local/lib64
    
  • Run the test cases:

    cd $SOURCE_ROOT/glusterfs
    ./run-tests.sh
    

Note:

  • The following test cases fail on s390x and x86_64 both:

    • For RHEL 8.10

      • ./tests/basic/posix/shared-statfs.t
    • For RHEL 9.6 and RHEL 9.7

      • ./tests/basic/afr/ta-read.t
      • ./tests/bugs/distribute/bug-1099890.t
      • ./tests/features/mandatory-lock-forced.t
    • For Ubuntu 22.04 and Ubuntu 24.04

      • ./tests/basic/ec/gfapi-ec-open-truncate.t
      • ./tests/basic/volume-snap-scheduler.t
      • ./tests/basic/volume-snapshot-clone-zfs.t
      • ./tests/basic/volume-snapshot-xml-zfs.t
      • ./tests/basic/volume-snapshot-zfs.t
      • ./tests/bugs/rpc/bug-954057.t
      • ./tests/bugs/snapshot/bug-1049834-zfs.t
      • ./tests/bugs/snapshot/bug-1087203-zfs.t
      • ./tests/bugs/snapshot/bug-1090042-zfs.t
      • ./tests/bugs/snapshot/bug-1109770-zfs.t
      • ./tests/bugs/snapshot/bug-1109889-zfs.t
      • ./tests/bugs/snapshot/bug-1112613-zfs.t
      • ./tests/bugs/snapshot/bug-1113975-zfs.t
      • ./tests/bugs/snapshot/bug-1155042-dont-display-deactivated-snapshots-zfs.t
      • ./tests/bugs/snapshot/bug-1157991-zfs.t
      • ./tests/bugs/snapshot/bug-1162462-zfs.t
      • ./tests/bugs/snapshot/bug-1162498-zfs.t
      • ./tests/bugs/snapshot/bug-1166197-zfs.t
      • ./tests/bugs/snapshot/bug-1168875-zfs.t
      • ./tests/bugs/snapshot/bug-1202436-calculate-quota-cksum-during-snap-restore-zfs.t
      • ./tests/bugs/snapshot/bug-1205592-zfs.t
      • ./tests/bugs/snapshot/bug-1227646-zfs.t
      • ./tests/bugs/snapshot/bug-1232430-zfs.t
      • ./tests/bugs/snapshot/bug-1250387-zfs.t
      • ./tests/bugs/snapshot/bug-1275616-zfs.t
      • ./tests/bugs/snapshot/bug-1279327-zfs.t
      • ./tests/bugs/snapshot/bug-1399598-uss-with-ssl-zfs.t
      • ./tests/bugs/snapshot/bug-1512451-snapshot-creation-failed-after-brick-reset-zfs.t
      • ./tests/bugs/snapshot/bug-1597662-zfs.t
      • ./tests/bugs/snapshot/bug-1618004-fix-memory-corruption-in-snap-import-zfs.t
    • For Ubuntu 22.04

      • ./tests/basic/posix/shared-statfs.t
      • ./tests/bugs/glusterfs-server/bug-887145.t
      • ./tests/bugs/snapshot/bug-1045333-zfs.t
      • ./tests/bugs/snapshot/bug-1109770.t
      • ./tests/bugs/snapshot/bug-1109889.t
      • ./tests/bugs/snapshot/bug-1316437.t
      • ./tests/bugs/snapshot/bug-1316437-zfs.t
    • For Ubuntu 24.04

      • ./tests/basic/afr/ta-read.t
      • ./tests/bugs/distribute/bug-1099890.t
      • ./tests/features/mandatory-lock-forced.t

3. Run the GlusterFS Daemon (Optional)

glusterd

Similar logs should be output in /var/log/glusterfs/glusterd.log:

[2025-10-03 08:18:46.343505 +0000] I [MSGID: 100030] [glusterfsd.c:2874:main] 0-glusterd: Started running version [{arg=glusterd}, {version=11.2}, {cmdlinestr=glusterd}]

4. Test the GlusterFS volume (Optional)

Refer to Documentation for instructions.

References