JZ2440 mount主機上的nfs文件系統出現提示:nfs:server is not responding, still trying

在mini2440開發板上掛載主機上的nfs文件系統後傳送較大文件時會出現下面的提示:
nfs:server is not responding, still trying
問題原因:
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.

大意是說具有較高的傳送速率的NFS主機網卡和較低速率的目標機網卡之間不匹配,要解決此問題需要在掛載文件系統時添加額外的參數。

解決辦法:
1 當目標機啓動後已經進入linux系統的情況下,使用以下mount命令:
mount -t nfs -o intr,nolock,rsize=1024,wsize=1024 59.70.245.216:/home/lizhao/rootfs /mnt/nfs
(即添加了intr rsize=1024 wsize=1024 參數,參數的具體意義見下面註釋)
2 當目標機處在引導階段向內核傳遞命令行參數時,使用以下參數:
console=ttySAC0 root=/dev/nfs nfsroot=59.70.245.216:/home/lizhao/rootfs, flags=intr,rsize=1024,wsize=1024 ip=59.70.245.222:59.70.245.216:59.70.245.216:255.255.255.0:leao:eth0:off

參數解釋:
intr – 當服務器宕機或者無法到達時,允許中斷NFS請求。
nolock–禁用文件鎖。 rsize = 8192 和 wsize=8192 – 通過設定大的同時傳輸的數據塊大小(bytes),以提高NFS讀寫的速度。改變這些值時要當心,一些舊的linux內核和網卡在大的塊大小不能正常工作。

發佈了55 篇原創文章 · 獲贊 13 · 訪問量 3萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章