Lustre Build Instructions

Building Lustre from source is recommended for custom kernels or unsupported distributions. This guide is for Lustre 2.17.0 (January 2026). Use prebuilt packages if possible. Client builds are simpler (no patched kernel), while server builds require kernel patching and e2fsprogs (if using ldiskfs). Source from GitHub or tarballs at Whamcloud. See Lustre Wiki for updates.

Prerequisites

Common: git, make, automake, autoconf, libtool, libyaml-devel, asciidoc, xmlto, bison, flex, expect.

RHEL 9/10 (and Clones)

dnf install kernel-devel kernel-rpm-macros kernel-abi-stablelists rpm-build libtool-ltdl-devel libselinux-devel e2fsprogs-devel quilt python3-docutils

SLES 15 SP7

zypper install kernel-devel kernel-macros kernel-syms rpm-build libtool libltdl-devel libselinux-devel e2fsprogs-devel quilt python3-docutils

Ubuntu 24.04

apt install linux-headers-$(uname -r) linux-modules-$(uname -r) build-essential dkms quilt libyaml-dev asciidoc xmlto bison flex libmp3lame-dev libtool libltdl-dev libselinux1-dev e2fsprogs python3-docutils fakeroot debhelper

Download Source

git clone https://github.com/lustre/lustre-release.git
cd lustre-release
git checkout v2.17.0  # Or master for latest development release (for test/dev)
./autogen.sh

Build e2fsprogs (Server Only)

git clone git://github.com/lustre/e2fsprogs.git
cd e2fsprogs
./configure
make
make install

Kernel Patching and Build (Server Only)

For servers, patch and build a kernel matching your distro (e.g., 5.14 for RHEL9).

# Download kernel source (e.g., for RHEL9)
dnf download --source kernel

# Unpack
rpm -i kernel-src.rpm
cd ~/rpmbuild/SPECS
rpmbuild -bp kernel.spec
cd ~/rpmbuild/BUILD/kernel-5.14.linux

# Link Lustre patches
ln -s ~/lustre-release/lustre/kernel_patches/patches patches
ln -s ~/lustre-release/lustre/kernel_patches/series/5.14-el9.series series

# Apply with Quilt
quilt push -av

# Config
cp ~/lustre-release/lustre/kernel_patches/kernel_configs/kernel-5.14-el9-x86_64.config .config
make olddefconfig

# Build
make -j$(nproc) bzImage modules
make modules_install
make install
reboot  # Into new kernel

For Ubuntu/SLES, adjust kernel source acquisition and series file (e.g., 5.15-ubuntu2404.series).

Configure and Build Lustre

For Client:

./configure --with-linux=/usr/src/linux-headers-$(uname -r) --disable-server
make -j$(nproc)
make install

For Server:

./configure --with-linux=/path/to/patched/kernel/source --enable-server --with-ldiskfs
make -j$(nproc)
make install

Building Packages

RPMs (RHEL/SLES)

make rpms
# Install RPMs from ~/rpmbuild/RPMS
dnf install *.rpm

DEBs (Ubuntu)

make debs
# Install DEBs from build/
dpkg -i *.deb

Notes: For ZFS backend, add --with-zfs; install ZFS dev packages. Custom kernels require DKMS for modules. Test with acceptance-small.sh. For older distros, use maintenance branches (2.15.x).