问题:
工作环境:VMWare 10.0.2 build 1744117,VMWare中安装Ubuntu12.04.4,Ubuntu中已配置好了nfs-kernel-server和portmap,更新了exports文件,并重启了nfs服务。
目标板使用广州华天正的real6410开发板,执行命令:
mount -t nfs 192.168.1.157:/nfsboot /mnt
得到错误信息:
[root@Real6410 /]# mount -t nfs 192.168.1.157:/nfsboot /mnt
rpcbind: server localhost not responding, timed out
RPC: failed to contact local rpcbind server (errno 5).
rpcbind: server localhost not responding, timed out
RPC: failed to contact local rpcbind server (errno 5).
rpcbind: server localhost not responding, timed out
RPC: failed to contact local rpcbind server (errno 5).
rpcbind: server localhost not responding, timed out
RPC: failed to contact local rpcbind server (errno 5).
lockd_up: makesock failed, error=-5
rpcbind: server localhost not responding, timed out
RPC: failed to contact local rpcbind server (errno 5).
rpcbind: server localhost not responding, timed out
RPC: failed to contact local rpcbind server (errno 5).
rpcbind: server localhost not responding, timed out
RPC: failed to contact local rpcbind server (errno 5).
mount: mounting 192.168.1.157:/nfsboot on /mnt failed: Input/output error
[root@Real6410 /]#
解决办法:
1. nfs_mount默认选项包括文件锁,依赖于portmap提供的动态端口分配功能;
所以,尝试禁止文件锁试一下。
执行命令:
mount -t nfs -o nolock 192.168.1.157:/nfsboot /mnt
结果是:
[root@Real6410 /]# mount -t nfs -o nolock 192.168.1.157:/nfsboot /mnt
[root@Real6410 /]#
没有错误提示了,说明已挂载成功。
查看一下挂载后的结果:
[root@Real6410 /]# df
Filesystem 1K-blocks Used Available Use% Mounted on
ubi0:rootfs 949256 267108 677088 28% /
df: /mnt/sdcard: No such file or directory
tmpfs 92500 0 92500 0% /dev/shm
192.168.1.157:/nfsboot
19478208 4878016 13587712 26% /mnt
[root@Real6410 /]#