cubefs/client_kernel
Wu Huocheng b519720773 chore(kernel): the basic version which pass kernel_test.sh script.
Notice: the kernel client support replica volume only.
The EC volume is not supported yet.

Signed-off-by: Wu Huocheng <wuhuocheng@oppo.com>
2024-12-04 09:59:43 +08:00
..
rdma @formatter:off 2024-09-10 09:32:13 +08:00
.clang-format feat(client_kernel): add cubefs client for linux kernel 2023-10-10 15:56:26 +08:00
.gitignore feat(client_kernel): merge codes from wuhc/performance 2024-04-25 10:24:10 +08:00
btree.c feat(client_kernel): add cubefs client for linux kernel 2023-10-10 15:56:26 +08:00
btree.h feat(client_kernel): add cubefs client for linux kernel 2023-10-10 15:56:26 +08:00
cfs_buffer.c fix(client_kernel): fix the bug of endless write action 2024-04-15 09:19:24 +08:00
cfs_buffer.h fix(client_kernel): fix the bug of endless write action 2024-04-15 09:19:24 +08:00
cfs_common.c @formatter:off 2024-08-05 11:30:03 +08:00
cfs_common.h @formatter:off 2024-08-05 11:30:03 +08:00
cfs_core.c @formatter:off 2024-09-09 16:58:32 +08:00
cfs_extent_cache.c @formatter:off 2024-08-15 18:52:22 +08:00
cfs_extent_client.c @formatter:off 2024-09-18 09:21:05 +08:00
cfs_extent_reader.c @formatter:off 2024-10-23 09:40:25 +08:00
cfs_extent_stream.c @formatter:off 2024-09-18 09:21:05 +08:00
cfs_extent_writer.c @formatter:off 2024-10-23 09:40:25 +08:00
cfs_extent.h @formatter:off 2024-09-06 10:15:39 +08:00
cfs_fs.c @formatter:off 2024-10-23 09:40:25 +08:00
cfs_fs.h @formatter:off 2024-09-09 16:58:32 +08:00
cfs_json.c update the license 2023-11-28 20:28:49 +08:00
cfs_json.h update the license 2023-11-28 20:28:49 +08:00
cfs_log.c @formatter:off 2024-10-23 09:40:25 +08:00
cfs_log.h @formatter:off 2024-10-23 09:40:25 +08:00
cfs_logtail.py fix(client_kernel): fix the crash of concurrent io 2023-11-30 10:49:30 +08:00
cfs_master.c @formatter:off 2024-08-05 11:30:03 +08:00
cfs_master.h update the license 2023-11-28 20:28:49 +08:00
cfs_meta.c @formatter:off 2024-09-11 14:09:53 +08:00
cfs_meta.h @formatter:off 2024-09-11 14:09:53 +08:00
cfs_option.c feat(client_kernel): merge codes from wuhc/performance 2024-04-25 10:24:10 +08:00
cfs_option.h feat(client_kernel): init client of rdma mode 2024-01-15 19:36:13 +08:00
cfs_packet.c @formatter:off 2024-08-08 19:21:59 +08:00
cfs_packet.h @formatter:off 2024-08-08 16:55:43 +08:00
cfs_page.c update the license 2023-11-28 20:28:49 +08:00
cfs_page.h @formatter:off 2024-08-02 16:30:40 +08:00
cfs_rdma_socket.c @formatter:off 2024-09-09 15:09:20 +08:00
cfs_rdma_socket.h @formatter:off 2024-09-05 17:07:47 +08:00
cfs_socket.c @formatter:off 2024-10-23 09:40:25 +08:00
cfs_socket.h @formatter:off 2024-09-05 17:07:47 +08:00
Chinese_readme.txt chore(kernel): the basic version which pass kernel_test.sh script. 2024-12-04 09:59:43 +08:00
configure @formatter:off 2024-08-01 10:24:47 +08:00
iov_iter.h @formatter:off 2024-08-01 10:24:47 +08:00
jsmn.h @formatter:off 2024-06-20 10:47:25 +08:00
Makefile @formatter:off 2024-07-26 16:56:54 +08:00
ReadMe.txt chore(kernel): the basic version which pass kernel_test.sh script. 2024-12-04 09:59:43 +08:00

Note: Currently, kernel-mode clients only support replica volumes, not EC volumes.

1. The compiled suceessed system platform includes: centos 8.5, rocky 9.2, ubuntu 20

2. Compile commands:
cd client_kernel
./configure
make
If you only use TCP network connections and do not use RDMA, you can compile:
make no_rdma
This will produce a cubefs.ko that does not include the RDMA interface, thereby avoiding errors when loading it.
Currently, the RDMA interface only supports interfacing with code implemented natively in the kernel.
On CentOS 7.6, you can use the following commands to install and load the rdma-core module:
# Install the dependency modules
sudo yum install -y rdma-core librdmacm libibverbs rdma-core-devel
# Load the rdma_cm module
sudo modprobe rdma_cm

3. Usage example:
modprobe rdma_cm
insmod cubefs.ko
The write path by tcp:
mount -t cubefs -o owner=whc,dentry_cache_valid_ms=5000,attr_cache_valid_ms=30000 //10.177.182.171:17010,10.177.80.10:17010,10.177.80.11:17010/whc /mnt/cubefs
The write path with rdma:
mount -t cubefs -o owner=whc,dentry_cache_valid_ms=5000,attr_cache_valid_ms=30000,enable_rdma=true,rdma_port=17360 //10.177.182.171:17010,10.177.80.10:17010,10.177.80.11:17010/whc /mnt/cubefs

Notify:
The rdma module is linux kernel's embed one. Please don't install MLNX_OFED_LINUX kernel module.
Before inserting cubefs.ko, it requires to run command: modprobe rdma_cm.

FQA:
1. If can't find the kernel depended module, it can be added by such command:
export KBUILD_EXTRA_SYMBOLS=/usr/src/kernels/4.18.0-348.7.1.el8_5.x86_64/Module.symvers
The 4.18.0-348.7.1.el8_5.x86_64 is kernel version.

2. Why not install MLNX_OFED_LINUX kernel module?
The rdma api is linked to kernel's. If install others, it will over write the kernel's.
Then rdam api version will be mismatch.

3. CentOS 7.6 can't works. Why?
Please check whether the rdma device under /dev/infiniband/.
If not, please try the commands: 
yum install -y rdma-core librdmacm libibverbs
modprobe rdma_cm
modprobe mlx5_ib