需要 NFS 安装方面的故障排除帮助。我有 dir1 和 dir2,据我所知,这两个目录的所有 NFS 相关设置和权限都是相同的。
这两个目录在大多数客户端上都能正确安装。但在工作站 192.168.1.14 上,只有 dir1 会挂载。 dir2 无法安装,如下所示。我不明白为什么。
我相信下面的输出提供了所需的信息。如果我需要发布额外的输出,请告诉我。
文件服务器:
/etc/exports:
#workstation=192.168.1.14
/export/home/staffcom/Internal/dir1 192.168.1.14(rw,sync,subtree_check,nohide)
/export/home/staffcom/Internal/dir2 192.168.1.14(rw,sync,subtree_check,nohide)
exporting 192.168.1.10:/export/home/staffcom/Internal/dir1
exporting 192.168.1.12:/export/home/staffcom/Internal/dir1
exporting 192.168.1.14:/export/home/staffcom/Internal/dir1
exporting 192.168.1.10:/export/home/staffcom/Internal/dir2
exporting 192.168.1.12:/export/home/staffcom/Internal/dir2
exporting 192.168.1.14:/export/home/staffcom/Internal/dir2
[root@fileserver Internal]# ls -la
total 16
drwxr-xr-x 4 user1 staff 4096 Feb 22 23:20 .
drwxr-x--x 32 user1 staff 4096 Apr 22 22:29 ..
drwxrws--x+ 2 user1 staff 4096 May 29 14:34 dir2
drwxrwx--x+ 4 user1 staff 4096 May 30 20:47 dir1
客户端机器(工作站):
/etc/fstab
fileserver:/export/home/staffcom/Internal/dir1 /home/staffcom/Internal/dir1 nfs4 auto,noatime 0 0
fileserver:/export/home/staffcom/Internal/dir2 /home/staffcom/Internal/dir2 nfs4 auto,noatime 0 0
[root@workstation Internal]# ls -la
total 0
drwxrws--- 1 user3 staff 28 May 30 22:51 .
drwxr-xr-x 1 user3 staff 104 Mar 28 19:15 ..
drwxrws--x 1 root staff 0 May 30 22:51 dir2
drwxrws--x 1 root staff 0 May 30 22:50 dir1
[root@workstation Internal]# showmount -e fileserver | grep "Internal/dir2"
/export/home/staffcom/Internal/dir2 192.168.1.10,192.168.1.12,192.168.1.14
结果:dir2 无法安装:
[root@workstation Internal]# mount /home/staffcom/Internal/dir2/
mount.nfs4: Protocol not supported
结果:dir1 成功安装:
[root@workstation Internal]# mount /home/staffcom/Internal/dir1/
[root@workstation Internal]#
使用详细输出检查挂载会显示更多线索:
[root@workstation Internal]# mount -v /home/staffcom/Internal/dir2/
mount.nfs4: timeout set for Tue May 30 23:17:32 2017
mount.nfs4: trying text-based options 'vers=4.2,addr=192.168.1.1,clientaddr=192.168.1.14'
mount.nfs4: mount(2): No such file or directory
mount.nfs4: trying text-based options 'addr=192.168.1.1'
mount.nfs4: prog 100003, trying vers=3, prot=6
mount.nfs4: trying 192.168.1.1 prog 100003 vers 3 prot TCP port 2049
mount.nfs4: portmap query retrying: RPC: Program/version mismatch
mount.nfs4: prog 100003, trying vers=3, prot=17
mount.nfs4: trying 192.168.1.1 prog 100003 vers 3 prot UDP port 2049
mount.nfs4: portmap query failed: RPC: Program/version mismatch
mount.nfs4: Protocol not supported