mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 19:34:43 +01:00
nfsd: Update the rc.d script for RDMA for the nfsd service
Commit 7144a1d58c added the hooks for the nfsrdma.ko module.
Once loaded, this module adds RDMA support to the nfsd.
This patch adds a few lines to /etc/rc.d/nfsd, so that
nfs_server_rdma_enable="YES"
in your /etc/rc.conf will load nfsrdma.ko, so that RDMA
service is enabled.
It also supports
nfs_server_rdma_listen="port#"
so that the default of 20490 can be overridden in /etc/rc.conf.
At this available as time, the nfsrdma.ko module is an unofficial port,
since it was developed by Vinicius Ferrao <[email protected]>
using generative AI.
As soon as it is available, it will be announced on
[email protected].
Suggested by: Vinicius Ferrao <versatushpc.com.br>
MFC after: 1 month
This commit is contained in:
1 parent
73cceb046c
commit
471e14267b
2 files changed
+9
No files matched your search
@@ -386,6 +386,8 @@ nfs_server_enable="NO" # This host is an NFS server (or NO).
|
||||
nfs_server_flags="-u -t" # Flags to nfsd (if enabled).
|
||||
nfs_server_managegids="NO" # The NFS server maps gids for AUTH_SYS (or NO).
|
||||
nfs_server_maxio="131072" # Maximum I/O size for the nfsd.
|
||||
nfs_server_rdma_enable="NO" # Enable the use of the nfsrdma module for RDMA
|
||||
nfs_server_rdma_listen="20490" # Port# for the NFS server to listen on for RDMA
|
||||
mountd_enable="NO" # Run mountd (or NO).
|
||||
mountd_flags="-r -S" # Flags to mountd (if NFS server enabled).
|
||||
weak_mountd_authentication="NO" # Allow non-root mount requests to be served.
|
||||
|
||||
@@ -63,6 +63,13 @@ nfsd_precmd()
|
||||
if [ -n "${nfs_server_vhost}" ]; then
|
||||
command_args="-V \"${nfs_server_vhost}\""
|
||||
fi
|
||||
|
||||
if checkyesno nfs_server_rdma_enable; then
|
||||
load_kld nfsrdma || err 1 "Cannot load nfsrdma"
|
||||
if ! sysctl vfs.nfsd.rdma_listen=${nfs_server_rdma_listen} >/dev/null; then
|
||||
warn "Failed to set RDMA listen port#"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
||||
Reference in new issue
Block a user