[lustre-discuss] Issues of building Lustre-2.7.0 for vanilla Linux kernel
Peter Jones
pjones at thelustrecollective.com
Mon Mar 30 06:41:28 PDT 2026
There is a mix of Lustre versions - 2.7.0 and 2.17.0 - referenced below. The former is ~ 11 years old and it would be no surprise if there were issues trying to build with current versions of other software. Was this just an error during the writeup?
From: lustre-discuss <lustre-discuss-bounces at lists.lustre.org> on behalf of Tung-Han Hsieh via lustre-discuss <lustre-discuss at lists.lustre.org>
Date: Sunday, March 29, 2026 at 9:21 PM
To: lustre <lustre-discuss at lists.lustre.org>
Subject: [lustre-discuss] Issues of building Lustre-2.7.0 for vanilla Linux kernel
Dear All,
Recently we tried to build Lustre-2.7.0 server for vanilla Linux kernel version 5, plus zfs-2.3.4, under Debian-12.13 Linux system with Mellanox Infiniband enabled. There are some issues to report. The building options are fixed to:
- for zfs-2.3.4:
./configure --prefix=/opt/lustre --with-linux=/usr/src/linux-<version>
- for lustre-2.7.0:
export KBUILD_EXTRA_SYMBOLS=/usr/src/zfs-2.3.4/module/Module.symvers
./configure --prefix=/opt/lustre --with-linux=/usr/src/linux-<version> \
--with-zfs=/usr/src/zfs-2.3.4 --with-o2ib=yes --disable-ldiskfs \
--disable-tests --enable-mpitests=no
1. For vanilla Linux kernel 5.4.279:
During compilation, we encounter the following errors:
=====================================================================
CC [M] /usr/src/lustre-2.17.0/libcfs/libcfs/crypto/keyring.o
/usr/src/lustre-2.17.0/libcfs/libcfs/crypto/keyring.c: In function free_master_key:
/usr/src/lustre-2.17.0/libcfs/libcfs/crypto/keyring.c:55:9: error: implicit declaration of function kfree_sensitive; did you mean kvfree_sensitive? [-Werror=implicit-function-declaration]
55 | kfree_sensitive(mk);
| ^~~~~~~~~~~~~~~
| kvfree_sensitive
cc1: all warnings being treated as errors
=====================================================================
After debug, we have to add the following code:
=====================================================================
// In the beginning of the source file, and after all the #include files.
#ifndef HAVE_KFREE_SENSITIVE
#define kfree_sensitive(x) kzfree(x)
#endif
=====================================================================
into the following source files:
- lustre-2.7.0/libcfs/libcfs/crypto/keyring.c
- lustre-2.7.0/libcfs/libcfs/crypto/keysetup_v1.c
to work around this problem, since kfree_sensitive() seems not available in vanilla Linux kernel 5.4.X.
2. For vanilla Linux kernel 5.10.252:
During compilation, we encounter the following errors:
=====================================================================
CC [M] /usr/src/lustre-2.17.0/lustre/llite/pcc.o
/usr/src/lustre-2.17.0/lustre/llite/pcc.c: In function __pcc_file_reset_projid:
/usr/src/lustre-2.17.0/lustre/llite/pcc.c:3491:18: error: implicit declaration of function get_fs; did you mean sget_fc? [-Werror=implicit-function-declaration]
3491 | old_fs = get_fs();
| ^~~~~~
| sget_fc
/usr/src/lustre-2.17.0/lustre/llite/pcc.c:3491:18: error: incompatible types when assigning to type mm_segment_t from type int
/usr/src/lustre-2.17.0/lustre/llite/pcc.c:3492:9: error: implicit declaration of function set_fs; did you mean sget_fc? [-Werror=implicit-function-declaration]
3492 | set_fs(KERNEL_DS);
| ^~~~~~
| sget_fc
/usr/src/lustre-2.17.0/lustre/llite/pcc.c:3492:16: error: KERNEL_DS undeclared (first use in this function); did you mean KERNFS_NS?
3492 | set_fs(KERNEL_DS);
| ^~~~~~~~~
| KERNFS_NS
/usr/src/lustre-2.17.0/lustre/llite/pcc.c:3492:16: note: each undeclared identifier is reported only once for each function it appears in
cc1: all warnings being treated as errors
=====================================================================
When looking into this problem, the static int __pcc_file_reset_projid() function of the file: lustre-2.17.0/lustre/lllite/pcc.c reads:
=====================================================================
#ifdef HAVE_FILEATTR_GET
....
rc = inode->i_op->fileattr_set(&nop_mnt_idmap, dentry, &fa);
#else
....
old_fs = get_fs();
set_fs(KERNEL_DS);
....
#endif
=====================================================================
It is awkward that, for vanilla Linux kernel 5.10.X, the old interface get_fs() and set_fs() were removed. However, the new interface fileattr_set() is not available. As a result, Lustre-2.17.0 cannot be built under vanilla Linux kernel 5.10.X, unless there is a specific patch.
3. For vanilla Linux kernel 5.15.202:
Lustre-2.17.0 can be built successfully. However, when loading lustre modules:
modprobe lustre
modprobe lnet
Both command encountered the following error message in dmesg:
=====================================================================
lustre_symbols_init: error -38
LNetError: 85487:0:(module.c:664:libcfs_init()) cfs_arch_init: error -38
=====================================================================
I did not debug it carefully. But I suspect that the mechanism of loading modules in kernel 5.15.X might be changed. So Lustre cannot start in this environment.
So, currently Lustre-2.17.0 server with zfs-2.3.4 can only work in vanilla kernel 5.4.X (I only tested 5.4.279). I hope that this report can be considered to add patches for vanilla kernel 5.15.X, or even 5.10.X, since newer releases of Linux kernel is needed for new hardware as the file servers.
Best Regards,
T.H.Hsieh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lustre.org/pipermail/lustre-discuss-lustre.org/attachments/20260330/67cb7144/attachment-0001.htm>
More information about the lustre-discuss
mailing list