nfs:server is not responding, still trying

問題描述:我使用目標機掛在nfs後,讀寫較大的文件就會出現server is not responding, still trying問題,google了一下,有人是這麼解決的,以下linux

*************************************************************************服務器

在mini2440開發板上掛載主機上的nfs文件系統後傳送較大文件時會出現下面的提示:this

nfs:server is not responding, still trying
問題緣由:
Mandag 27 november 2006 20:12 skrev Verner Kjrsgaard:
> 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=1024ip=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內核和網卡在大的塊大小不能正常工做google

相關文章
相關標籤/搜索