linux 挂载常见错误,mount常见的错误。

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
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值