Building GlusterFS - linux-on-ibm-z/docs GitHub Wiki
Following versions of GlusterFS are available in respective distributions at the time of creation of these build instructions:
- RHEL (8.10, 9.6) 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)
- Ubuntu (22.04, 24.04)
Note: For Ubuntu (22.04, 24.04), please refer to this link to install GlusterFS 11.1 from the community GlusterFS PPA (ppa:gluster/glusterfs-11).
- 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
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.
-
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
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
-
Ubuntu (22.04, 24.04)
apt-get update && apt-get install -y curl gcc g++ git make automake autoconf libtool flex bison pkg-config libssl-dev libxml2-dev python3-dev libaio-dev libibverbs-dev librdmacm-dev libreadline-dev liblvm2-dev libglib2.0-dev liburcu-dev libcmocka-dev libsqlite3-dev libacl1-dev liburing-dev google-perftools libgoogle-perftools-dev libtirpc-dev
-
- RHEL 8.10
yum install -y gcc-toolset-11-gcc-c++ scl enable gcc-toolset-11 bash
- RHEL 8.10
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- RHEL (8.10, 9.6)
yum install -y dbench perl-Test-Harness yajl net-tools psmisc nfs-utils xfsprogs attr procps-ng gdb python3 iproute pip3 install prettytable - Ubuntu (22.04, 24.04)
apt install -y dbench yajl-tools net-tools psmisc libnfs-utils xfsprogs attr procps gdb iproute2 nfs-common python3 python3-pip python3-prettytable libxml2-utils bc zfsutils-linux acl xdg-utils uuid-runtime # Workaround for missing pstack mkdir -p /tmp/gluster-test-bin cat > /tmp/gluster-test-bin/pstack <<'EOF' #!/bin/sh [ -z "$1" ] && echo "Usage: pstack <pid>" && exit 1 exec gdb -ex "thread apply all bt" -batch -p "$1" -ex detach EOF chmod +x /tmp/gluster-test-bin/pstack # Workaround for missing gstack cat > /tmp/gluster-test-bin/gstack <<'EOF' #!/bin/sh [ -z "$1" ] && echo "Usage: gstack <pid>" && exit 1 exec gdb -ex "thread apply all bt" -batch -p "$1" -ex detach EOF chmod +x /tmp/gluster-test-bin/gstack export PATH="/tmp/gluster-test-bin:$PATH"
-
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
./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
-
glusterdSimilar 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}]
Refer to Documentation for instructions.