At work, I often use NFS service and also encounter some problems. Luckily, I also fix them and record here.
1. wrong minorversion
NFS: bad mount option value specified: minorversion=1
fixed: specify correct minorversion, not use default value
mount -t nfs -o nolock ${SERVER_IP}:/rootfs/wb /mnt/nfs
change to:
mount -t nfs -o nfsvers=3,nolock ${SERVER_IP}:/rootfs/wb /mnt/nfs
2. prints "NFSD: client x.x.x.x testing state ID with incorrect client ID" on NFS server side
[ 4824.740317] NFSD: client 192.168.100.24 testing state ID with incorrect client ID
[ 4824.898897] NFSD: client 192.168.100.24 testing state ID with incorrect client ID
[ 4824.899860] NFSD: client 192.168.100.24 testing state ID with incorrect client ID
[ 4829.158029] nfsd4_validate_stateid: 22 callbacks suppressed
[ 4829.158030] NFSD: client 192.168.100.117 testing state ID with incorrect client ID
[ 4829.432467] NFSD: client 192.168.100.71 testing state ID with incorrect client ID
[ 4829.433730] NFSD: client 192.168.100.71 testing state ID with incorrect client ID
[ 4829.434959] NFSD: client 192.168.100.71 testing state ID with incorrect client ID
[ 4829.436310] NFSD: client 192.168.100.71 testing state ID with incorrect client ID
fixed: the above log means one same client use different client state ID to mount NFS server.
for multiple mounting actions, must use same commnad, especially, specify a same minorversion
for example:
use nfsvers=3 in kernel command line:
[ 0.000000] Kernel command line: console=ttymxc0,115200n8 root=/dev/nfs rw nfsroot=192.168.100.8:/rootfs/LF_202106151512/imx63_rootfs_r,tcp,hard,v3 fsck.mode=skip no_console_suspend ip=dhcp
when mounting VTE in kernel, also should use nfsvers=3, not use default value
mount -t nfs -o nfsvers=3,nolock ${SERVER_IP}:/rootfs/wb /mnt/nfs
3. prints "NFS: Server x.x.x.x reports our clientid is in use" on client side
[ 721.031670] NFS: Server 192.168.100.8 reports our clientid is in use
[ 721.038186] NFS: state manager: reset session failed on NFSv4 server 192.168.100.8 with error 1
[ 722.076761] NFS: Server 192.168.100.8 reports our clientid is in use
[ 722.083149] NFS: state manager: reset session failed on NFSv4 server 192.168.100.8 with error 1
[ 723.116765] NFS: Server 192.168.100.8 reports our clientid is in use
[ 723.123153] NFS: state manager: reset session failed on NFSv4 server 192.168.100.8 with error 1
[ 724.156437] NFS: Server 192.168.100.8 reports our clientid is in use
[ 724.162824] NFS: state manager: reset session failed on NFSv4 server 192.168.100.8 with error 1
[ 725.196745] NFS: Server 192.168.100.8 reports our clientid is in use
[ 725.203136] NFS: state manager: reset session failed on NFSv4 server 192.168.100.8 with error 1
fixed: just guess that I modify /etc/exports configuration file and cause above errors.
restore /etc/exports file:
/rootfs *(rw,sync,subtree_check,no_root_squash)
and use nfsvers=3 to mount NFS for all clients
在工作中遇到NFS服务的一些问题,包括错误的minorversion、NFS服务器端显示客户端ID错误以及客户端显示服务器报告我们的clientid正在使用。通过指定正确的nfsvers、保持挂载命令一致以及检查/etc/exports配置,成功解决了这些问题。
2565

被折叠的 条评论
为什么被折叠?



