This walk-through is targeting developers who want to explore the bleeding edge of Lustre or build on CPUs/kernel combinations not currently supported by the automated builders.

If you are evaluating Lustre for production, you should choose a stable Lustre Release.


Purpose

This page describes all the necessary steps to:

  • Create the Lustre Client DEB packages

Prerequisites

  • A newly installed Debian 10.1.0 machine connected to the internet.
  • NOTE: The build instructions below assume that SE-Linux is disabled. If you enable it, this guide should only be used as a source of inspiration, not of authoritative information.

Overview

The following kernel version will be used in this guide for Debian 10.1.0 release:

  • Linux debian 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20) x86_64 GNU/Linux

1.) Installing the build dependency packages

The fastest way to install the needed tools is by using the Debian build-dependency feature:

sudo apt install -y build-dep linux-headers-$(uname -r)
sudo apt install -y libtool libyaml-dev ed libreadline-dev dpatch libsnmp-dev mpi-default-dev libselinux-dev libncurses5-dev libncurses-dev
sudo apt install -y bison flex gnupg libelf-dev gcc libssl-dev bc wget bzip2 build-essential udev kmod cpio module-assistant

After installing linux-headers packages, the /usr/src/ directory contains:

ls -F /usr/src/
linux-headers-4.19.0-6-amd64/ linux-headers-4.19.0-6-common/ linux-kbuild-4.19@

The following instructions assume that you run in a directory that has at least 20 GB free disk space and is writable by your user.
It will be assumed, that this path is available as ${BUILDPATH}, such as /usr/src/lustre.

2.) Building Lustre Client Packages

2.1) Downloading Lustre Sources

The first step is to download the most recent Lustre sources from the Whamcloud Git repo:

cd ${BUILDPATH}
git clone git://git.whamcloud.com/fs/lustre-release.git
cd lustre-release

2.2) Building Lustre Client Packages

Building the Client packages has the least demands and only needs the kernel headers being available. The kernel headers installed needs to match the running kernel version.

Unless the build system for those has already been made compatible with DKMS (Dynamic Kernel Module Support), it will be necessary to generate a suitable package for each kernel version your clients run under.

Before building the client packages, we need to find out the location of the following header files:

dpkg -S compiler-gcc.h kconfig.h

If they are in different directories, please copy the header files from common directory to amd64 directory:

cp -a /usr/src/linux-headers-4.19.0-6-common/include/* /usr/src/linux-headers-4.19.0-6-amd64/include/
ln -s /usr/src/linux-headers-4.19.0-6-common/arch/x86/include/asm /usr/src/linux-headers-4.19.0-6-amd64/arch/x86/include/asm
ln -s /usr/src/linux-headers-4.19.0-6-common/arch/x86/include/uapi /usr/src/linux-headers-4.19.0-6-amd64/arch/x86/include/uapi

To build the client packages, execute the following:

cd ${BUILDPATH}/lustre-release
sh autogen.sh &&
./configure --disable-server --with-linux=/usr/src/linux-headers-4.19.0-6-amd64 &&
make debs -j $(nproc)
or
make dkms-debs -j $(nproc)

Unless there was a compilation error, you should find a set of Debian packages in the "lustre-release/debs" subdirectory.
Copy these to a sane location, so that you can use them for installing Lustre Clients.

Also remember what was said earlier: Unless DKMS has been enabled, you need to compile a separate set of modules for each target kernel version!



  • No labels