分享

mount常见的错误。

 lifei_szdz 2012-09-25

mount常见的错误。

(2011-08-27 22:44:36)
标签:

杂谈

1、mount时出现错误,原因是主机防火墙没有关闭。
/ # mount -t nfs 192.168.3.101:/initrd /mnt
mount: RPC: Unable to receive; errno = No route to host
mount: mounting 192.168.3.101:/initrd on /mnt failed: Bad file descriptor
/ # route add default gw 192.168.3.1 dev eth0
/ # mount -t nfs 192.168.3.101:/initrd /mnt
mount: RPC: Unable to receive; errno = No route to host
mount: mounting 192.168.3.101:/initrd on /mnt failed: Bad file descriptor
/ # mount -t nfs 192.168.3.101:/initrd /mnt
mount: RPC: Unable to receive; errno = No route to host
mount: mounting 192.168.3.101:/initrd on /mnt failed: Bad file descriptor

 

在网上找到关闭防火墙的方法:

1、永久性关闭

lokkit --disabled
2、 即时生效,重启后失效

service 方式
开启: service iptables start
关闭: service iptables stop

iptables方式

查看防火墙状态:
/etc/init.d/iptables status

暂时关闭防火墙:
/etc/init.d/iptables stop

重启iptables:
/etc/init.d/iptables restart

 

2、在解决上面的问题后面一个可能碰到的问题就是下面这个了,网上的解决办法是加上-o的选项。
/ # mount -t nfs 192.168.3.101:/initrd /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).
lockd_up: makesock failed, error=-5
rpcbind: server localhost not responding, timed out
RPC: failed to contact local rpcbind server (errno 5).
mount: mounting 192.168.3.101:/initrd on /mnt failed: Input/output error

加入-o nolock选项,root:# mount -o nolock -t nfs 192.168.100.21:/home/cnh01994/nfsroot /mnt/nfs则工作正常。

 

至此,我们就可以通过单板mount主机上的目录了。调试就方便多了。

下一步计划是NFS启动,这样的话调试就方便许多了。

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多