Linux command
nfsd 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Start NFS server
sudo systemctl start nfs-server
Enable at boot
sudo systemctl enable nfs-server
Start with a specific number of threads
sudo rpc.nfsd [16]
Disable NFS version 3
sudo rpc.nfsd -N 3
Check NFS server status
sudo systemctl status nfs-server
Start with specific port and RDMA support
sudo rpc.nfsd -p [2049] -r
说明
nfsd (NFS server daemon) handles NFS requests from clients. It implements the NFS protocol to share filesystems over the network. The number of threads determines how many concurrent requests can be handled.
参数
- nprocs
- Number of server threads (default: 8).
- -d, --debug
- Debug mode.
- -H, --host _addr_
- Specify a particular hostname or address to accept NFS requests on. By default, all known network addresses are used.
- -p, --port _port_
- Specify a different port to listen on for NFS requests (default: 2049).
- -r, --rdma _port_
- Enable RDMA transport on the specified port (default: 20049).
- -N, --no-nfs-version _ver_
- Disable a specific NFS version (e.g., 3, 4, 4.1, 4.2).
- -V, --nfs-version _ver_
- Enable a specific NFS version.
- -s, --syslog
- Log error messages to syslog instead of stderr.
- -t, --tcp
- Listen on a TCP socket (default).
- -T, --no-tcp
- Disable TCP connections from clients.
- -u, --udp
- Listen on a UDP socket.
- -U, --no-udp
- Disable UDP connections from clients (default).
- -L _seconds_, --lease-time _seconds_
- Set the NFSv4 lease time (10–3600 seconds).
- -G _seconds_, --grace-time _seconds_
- Set the NFSv4/NLM grace period for reclaiming state.
- -S _scope_, --scope _scope_
- Set the NFSv4.1+ server scope identifier.
FAQ
What is the nfsd command used for?
nfsd (NFS server daemon) handles NFS requests from clients. It implements the NFS protocol to share filesystems over the network. The number of threads determines how many concurrent requests can be handled.
How do I run a basic nfsd example?
Run `sudo systemctl start nfs-server` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does nprocs do in nfsd?
Number of server threads (default: 8).