nfs:server is not responding,still trying 原因与解决方案
http://blog.csdn.net/do2jiang/article/details/4950613
網上搜索了下
“
---nfs:server is not responding,still trying??? 原因與解決方案
---本來還以為是nfs出了故障,但是google了一下發現原來不是nfs的原因,而是由于傳送的數據太大,出現數據包丟失現象。
?? NFS 的默認傳輸協議是 UDP,而PC機與嵌入式系統通過UPD交互時就會出現嚴重的網卡丟包現象。可用的解決方案是:在客戶端改用TCP協議,使用下面的命令,
mount -t nfs -o intr,nolock,rsize=1024,wsize=1024 192.168.0.121:/主機nfs目錄?/掛載路徑?
?? 注意:中間使用的是逗號,而非英文中的句號。
”
?
明顯該命令沒有指定 tcp協議
?
?
正確解決方法:
?
“
R.wen
?
在移植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=”后面,每個參數用逗號隔開,如:
?
mount -t nfs 192.168.10.1:/work/nfs /mnt/nfs -o nolock,proto=tcp,nfsvers=3
這樣就可以指定nfs使用tcp協議。
?
重啟后發現,竟然不再出現not responding的錯誤,一切感覺較為正常。
不過,cs8900a丟包現象依然存在。所以,使用tcp只是一個可行的解決辦法,但最終還得解決網卡的丟包問題。
?
-------------------------------------------------------------------
?
?
附:18.4. Common NFS Mount Options
www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/Deployment_Guide-en-US/s1-nfs-client-config-options.html
?
”
總結
以上是生活随笔為你收集整理的nfs:server is not responding,still trying 原因与解决方案的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 交叉编译mysql客户端libmysql
- 下一篇: MySql 内存表使用