`
bigfirebird
  • 浏览: 128854 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

NFS作为根文件系统时server not responding问题的解决

阅读更多
检查一下主机的NFS服务是否正常工作,可以重启一下nfs服务:sudo /etc/init.d/portmap restart
要是还不行的话,重新安装一遍nfs服务试试

在移植cs89x0后,就一直碰到如下这个问题:


nfs: server 192.168.10.1 not responding

nfs: server 192.168.10.1 not responding

nfs: server 192.168.10.1 OK

……


嵌入式系统要经过很多次很长时间的尝试才能挂上。初步怀疑是NFS配置的问题,后来猜测可能是由于cs8900a丢包严重造成的。


在nfs faq找到:


kernel: nfs: server server.domain.name not responding, still trying
kernel: nfs: task 10754 can't get a request slot
kernel: nfs: server server.domain.name OK

A. The "can't get a request slot" message means that the client-side RPC code has detected a lot of timeouts (perhaps due to network congestion, perhaps due to an overloaded server), and is throttling back the number of concurrent outstanding requests in an attempt to lighten the load. Some possible causes:

* Network congestion
* Overloaded server
* Packets (input or output) dropped by a bad NIC or driver....


根据上述观点,造成NFS没有回应的原因有3个,分别为网络拥塞、服务器过载和网卡丢包。

在我们的实验系统中,嵌入式系统和宿主机是直连的,而且服务器的基本处于空载的情形,所以不应该是前面两种情况,所以很可能是嵌入式系统网卡丢包严重引起的。


在目标机器中,用ifconfig看了一下,确实丢包比较严重。很可能就是这个问题了。


另一个意外的发现是,在查询丢包是,用tcpdump观察到nfs使用的是UDP协议。于是猜想,用TCP会不会有所改善?

       接着就是另一个问题,如何在nfs作为根文件系统时,指定nfs挂载的参数?

带着问题,跟踪了fs/nfs/nfsroot.c的代码,发现在nfs作为根文件系统时,参数可以直接写在“nfsroot=”后面,每个参数用逗号隔开,如:

nfsroot=192.168.10.1:/rootfs,proto=tcp,nfsvers=3,nolock

这样就可以指定nfs使用tcp协议。


重启后发现,竟然不再出现not responding的错误,一切感觉较为正常。

不过,cs8900a丢包现象依然存在。所以,使用tcp只是一个可行的解决办法,但最终还得解决网卡的丢包问题。



我在arm上通过NFS共享文件时出现下面的错误提示
nfs:server is not responding,still trying

原因分析:NFS 的默认传输协议是 UDP,而PC机与嵌入式系统通过UPD交互时就会出现严重的网卡丢包现象。

解决方法:在客户端改用TCP协议,使用下面的命令,
#mount -t nfs -o nolock -o tcp 192.168.1.161:/opt /opt



问题三 NFS:server not responing ,still trying
文章出处:http://www.diybl.com/course/6_system/linux/Linuxjs/2008716/133207.html
在目标板上通过NFS复制PC机上较大文件到目标板上的时候遇到的问题:
nfs: server *** not responding, still trying

修改方法:
nfs mount时候出现的NFS崩溃,按照以下的方式mount
mount -t nfs -o intr,nolock,rsize=1024,wsize=1024 192.168.1.3/root/somedir /client


问题原因:
Mandag 27 november 2006 20:12 skrev Verner Kjærsgaard:
> Mandag 27 november 2006 19:33 skrev John P. New:
> > Verner,
> >
> > This is a problem with NFS and 2.6 kernels, fast server NICs and
> > comparatively slower client NICs. This will show up when the server has
> > a 1000Mb card and the client a 100Mb, or when the server has a 100Mb
> > card and the client a 10Mb.
> >
> > Essentially, you have to pass some options to the kernel on terminal
> > boot, and this varies depending on whether you are using etherboot or
> > PXE.
> >
> > See
> > http://wiki.ltsp.org/twiki/bin/view/Ltsp/NFS#NFS_Server_not_responding
> > for a deeper explanation of the problem and the cure.
//注:原因是server机和目标机网卡传输速率冲突,使得目标机需要大量时间复制大量数据包,其实如果目标机的网卡速率够大,则不用分那么多包,也不会冲突。


附 问题四:在测试时,“./progressbar -qws”后出现如Q3一样的提示 ,按Q3来处理。
以上参考了一些 “ 快乐的天空”的经验,他的网页是:
http://blog.chinaunix.net/u2/67519/showart_677885.html
他的
mount -t nfs -o intr,nolock,rsize=1024,wsize=1024 192.168.1.3/root/somedir /host
应该改成
mount -t nfs -o intr,nolock,rsize=1024,wsize=1024 192.168.1.3/root/somedir /client
文章出处:http://www.diybl.com/course/6_system/linux/Linuxjs/2008716/133207.html
分享到:
评论

相关推荐

    adb not responding

    android开发时常会碰到adb not responding,导致无法调试运行应用程序,通过DDMS的Reset adb后依旧无法解决,那么可以尝试使用此bat文件: 1、下载后点击运行,显示端口使用列表 2、找到状态为LISTENING的一行,复制...

    NFS服务器配置-挂载nfs

    错误: `rpcbind: server localhost not responding, timed out` - **原因**: 与rpcbind服务有关的问题。 - **解决方法**: - 在挂载NFS命令中加入`-o nolock`: `#mount -t nfs -o nolock 192.168.1.105:/ /mnt/nfs`...

    external device not responding(解决方案).md

    external device not responding(解决方案).md

    NFS服务器配置、挂载

    3. **错误:rpcbind: server localhost not responding, timed out** - 原因:RPC服务未响应。 - 解决方法:尝试在挂载命令中添加`-o nolock`选项: ``` # mount -t nfs -o nolock 192.168.1.105:/ /mnt/nfs ``...

    NFS服务器配置-挂载NFS(详细介绍).pdf

    错误:“rpcbind: server localhost not responding, timed out” - **解决方法**:在挂载命令中添加 `-o nolock` 参数以避免此问题: ``` #mount -t nfs -o nolock 192.168.1.105:/ /mnt/nfs ``` 通过以上步骤...

    挂载NFS个人总结

    - "rpcbind: server localhost not responding, timed out":可以尝试添加 `-o nolock` 参数来挂载,如 `mount -t nfs -o nolock ...`,这将忽略锁机制导致的问题。 5. 自动挂载设置: - 开发板启动时自动挂载NFS...

    NFS Illustrated by Brent Callaghan (z-lib.org).pdf

    administrators, NFS is invisible—if you ignore the rare “NFS server not responding” message. It’s easy to forget NFS is there. NFS has no programming interface of its own. Even software engineers ...

    NFS连接出现问题的解决办法

    rpcbind:server localhost not responding,timeout...

    Application-Not-Responding(ANR)-Analyze.pdf

    MTK 内部资料介绍ANR 相关 Outline ▪ What is ANR; ▪ ANR key info; ▪ Analyze ANR; ▪ Example; ▪ Need MTK help; ▪ Monkey ANR

    Motor Not Responding(解决方案).md

    项目中碰到的问题

    Device Not Responding(解决方案).md

    项目中碰到过的

    Android ANR(Application Not Responding)的分析

     ANR定义:在Android上,如果你的应用程序有一段时间响应不够灵敏,系统会向用户显示一个对话框,这个对话框称作应用程序无响应(ANR:Application Not Responding)对话框。用户可以选择“等待”而让程序继续运行...

    通过Android trace文件分析死锁ANR实例过程

    在Android开发过程中,Application Not Responding(ANR)是一个开发者经常遇到的问题,它表示应用程序对用户操作或系统服务请求反应过慢,导致用户体验下降。ANR的产生原因多种多样,其中包括CPU负载过高、输入事件...

    Android开发中避免应用无响应的方法(Application Not Responding、ANR)

    在Android应用开发中,避免应用无响应(ANR:Application Not Responding)是至关重要的,因为这直接影响到用户体验。ANR通常发生在应用无法在规定时间内响应用户操作或系统广播时,例如,当UI线程被长时间阻塞时。...

    android7 关闭ANR对话框代码

    在Android系统中,ANR(Application Not Responding)是一个常见的问题,它表示应用程序无响应,通常出现在用户界面长时间无法交互时。在Android 7.0版本中,框架引入了一种新特性,即自动关闭ANR对话框,并允许...

    Win7系统程序假死未响应的解决办法.docx

    Win7 系统程序假死未响应是指在 Windows 7 操作系统中,某些应用程序在运行时出现假死或未响应的情况,这种情形可能会导致系统性能下降、资源浪费等问题。下面我们就来讨论一下 Win7 系统程序假死未响应的原因和...

    DELL-服务器系统提示错误解决的若干办法.doc

    DELL 服务器系统错误解决方法 在 DELL 服务器系统中,可能会出现各种错误信息,影响服务器的稳定运行。以下是常见的错误信息及其解决方法: 1. Alert! iDRAC6 not responding. 解决方法:等待系统重新引导。如果...

    DELL服务器系统提示错误解决的若干办法.docx

    本文档旨在解决DELL服务器系统中出现的各种错误提示信息,提供了多种解决方法,以帮助用户快速解决问题,恢复系统正常运作。 iDRAC6未响应 * 原因:iDRAC6未正常运行或未完成初始化。 * 解决方法:等待系统重新...

Global site tag (gtag.js) - Google Analytics