挂载nfs文件系统时错误:
1. 关闭防火墙,设置宿主机的IP为192.168.1.1
2. 在宿主机上开启nfs和portmap服务(开启后运行正常)
3. 在宿主机上编辑/etc/exports文件,在文件中加入下面的一行内容:
/opt/root_nfs *(rw,sync,no_root_squash)
4. 重新开启nfs服务(正常运行)
5. 串口线接好后,在宿主机上开启minicom窗口,启动目标机(开发板)
6. 目标机启动后,在minicom窗口中输入ifconfig命令后显示目标机的IP为192.168.1.6
7. 在minicom中输入:ping 192.168.1.1,能够ping到宿主机
8. 在宿主机上输入:ping 192.168.1.6,能够ping到目标机,说明网络没有问题
9. 在另一台PC(非宿主机)上设置其IP为192.168.1.10,ping 192.168.1.1也正常
10. 在192.168.1.10 PC上开启portmap服务,关闭nfs服务
11. 在192.168.1.10 PC上挂载nfs正常:
mount -t nfs 192.168.1.1:/opt/root_nfs /mnt/nfs
12.在宿主机的minicom中输入 mount -t nfs 192.168.1.1:/opt/root_nfs /mnt/nfs后出现如下错误:
portmap: server localhost not responding, time out
RPC: failed to contact portmap (errno -5)
portmap: server localhost not responding, time out
RPC: failed to contact portmap (errno -5)
lockd_up: makesock failed, error=-5
portmap: server localhost not responding, time out
RPC: failed to contact portmap (errno -5)
在192.168.1.10 PC上如果关闭portmap服务挂载nfs时会出现“input/output error"这样的错误,
是否是目标机上的portmap服务没有开启的原因,但是怎样开启该服务?/etc/init.d目录下没有找到portmap服务。
如果不是portmap服务的原因,那么又是什么原因呢?
目标机是尤龙的TQ2440开发板,内核是Linux2.6 kernel for S3C2440。
xinghuan@1990 于 2012-11-16 16:29:38发表:
我死来学习的
于 2012-11-16 09:23:13发表:
为什么加了-o nolock 参数就正常了呢?而正常情况下是不需要加这个参数,这个参数是在不想因其他原因无故断开连接而夯住使用的呀。
pangheming 于 2009-08-04 23:08:50发表:
LZ回去看书去
tjwangzhen 于 2009-08-04 14:34:32发表:
请问怎么在minicom下输入ifconfig命令
望指点 tj_wangzhen@gmail.com
gaoruifeng5 于 2009-05-08 09:44:24发表:
FC8下可能没有portmap这个服务,开启rpcbind这个服务就可以看,/etc/init.d/rcpbind start
travelchina2008 于 2009-02-07 15:50:51发表:
本问题我自己解决了,在mount命令后加参数nolock就可以了:
mount -t nfs 192.168.1.1:/opt/root_nfs /opt/nfs -o nolock