nfs:server is not responding,still trying 原因与解决方案
http://blog.csdn.net/do2jiang/article/details/4950613
網(wǎng)上搜索了下
“
---nfs:server is not responding,still trying??? 原因與解決方案
---本來還以為是nfs出了故障,但是google了一下發(fā)現(xiàn)原來不是nfs的原因,而是由于傳送的數(shù)據(jù)太大,出現(xiàn)數(shù)據(jù)包丟失現(xiàn)象。
?? NFS 的默認(rèn)傳輸協(xié)議是 UDP,而PC機與嵌入式系統(tǒng)通過UPD交互時就會出現(xiàn)嚴(yán)重的網(wǎng)卡丟包現(xiàn)象。可用的解決方案是:在客戶端改用TCP協(xié)議,使用下面的命令,
mount -t nfs -o intr,nolock,rsize=1024,wsize=1024 192.168.0.121:/主機nfs目錄?/掛載路徑?
?? 注意:中間使用的是逗號,而非英文中的句號。
”
?
明顯該命令沒有指定 tcp協(xié)議
?
?
正確解決方法:
?
“
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
……
?
嵌入式系統(tǒng)要經(jīng)過很多次很長時間的嘗試才能掛上。初步懷疑是NFS配置的問題,后來猜測可能是由于cs8900a丟包嚴(yán)重造成的。
?
在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....
?
根據(jù)上述觀點,造成NFS沒有回應(yīng)的原因有3個,分別為網(wǎng)絡(luò)擁塞、服務(wù)器過載和網(wǎng)卡丟包。
在我們的實驗系統(tǒng)中,嵌入式系統(tǒng)和宿主機是直連的,而且服務(wù)器的基本處于空載的情形,所以不應(yīng)該是前面兩種情況,所以很可能是嵌入式系統(tǒng)網(wǎng)卡丟包嚴(yán)重引起的。
?
在目標(biāo)機器中,用ifconfig看了一下,確實丟包比較嚴(yán)重。很可能就是這個問題了。
?
另一個意外的發(fā)現(xiàn)是,在查詢丟包是,用tcpdump觀察到nfs使用的是UDP協(xié)議。于是猜想,用TCP會不會有所改善?
?????? 接著就是另一個問題,如何在nfs作為根文件系統(tǒng)時,指定nfs掛載的參數(shù)?
帶著問題,跟蹤了fs/nfs/nfsroot.c的代碼,發(fā)現(xiàn)在nfs作為根文件系統(tǒng)時,參數(shù)可以直接寫在“nfsroot=”后面,每個參數(shù)用逗號隔開,如:
?
mount -t nfs 192.168.10.1:/work/nfs /mnt/nfs -o nolock,proto=tcp,nfsvers=3
這樣就可以指定nfs使用tcp協(xié)議。
?
重啟后發(fā)現(xiàn),竟然不再出現(xiàn)not responding的錯誤,一切感覺較為正常。
不過,cs8900a丟包現(xiàn)象依然存在。所以,使用tcp只是一個可行的解決辦法,但最終還得解決網(wǎng)卡的丟包問題。
?
-------------------------------------------------------------------
?
?
附: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
?
”
總結(jié)
以上是生活随笔為你收集整理的nfs:server is not responding,still trying 原因与解决方案的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 交叉编译mysql客户端libmysql
- 下一篇: MySql 内存表使用