If the lustre-client RPMs need to be rebuild against a different client kernel, follow this procedure.
Procedure
NOTE This procedure assumes you are using a RPM based distribution. For example RHEL, CentOS, Rocky, Alma, etc.
- Install the following packages:
kernel-devel
rpm-build
make
libtool
zlib-devel
libselinux-devel
openssl-devel
redhat-rpm-config
flex
bison
libnl3-devel
kernel versions
If you are not currently booted into the kernel provided by
kernel-devel
package, please review the Trouble-shooting section below.
- Download the
lustre-VERSION.src.rpm
(from thelustre-VERSION/DISTRO/client/SRPMS
section of the download site if you don't already have a specific version you want to build). - On the build node, run the command:
# rpmbuild --rebuild --without servers lustre-VERSION.src.rpm
NOTE The resulting RPMS may be named 'lustre-client-modules
-*' and 'kmod-lustre-client-*
', or 'lustre-modules
' and 'kmod-lustre-*
' depending on build options used.
Trouble-shooting
Building against a different kernel.
To build against a different installed kernel to the one currently running on the build node, you need to specify the kernel version and source directory to rpmbuild
. For example:
rpmbuild --define 'kversion 4.18.0-425.13.1.el8_7.x86_64' --define 'kdir /usr/src/kernels/4.18.0-425.13.1.el8_7.x86_64/' --rebuild lustre-client-VERSION.src.rpm