登录 | 首页 -> 华新鲜事 -> 技术の宅 | 切换到:传统版 / sForum | 树形列表
nfs 一记。
<<始页  [1]  末页>> 

nfs 一记。在linux下mount nfs。

想让它开机后自动就mount上,于是就在/etc/fstab里面加了一行:
server ip:/directory /localDirectory nfs defaults 0 0

结果开机后发现没有效果。很奇怪。百思不得其解。

看/var/log/messages,发现错误:
Jan 3 16:17:35 sec3 kernel: tg3: eth0: Link is up at 100 Mbps, full duplex.
Jan 3 16:17:35 sec3 kernel: tg3: eth0: Flow control is off for TX and off for RX.
Jan 3 16:17:44 sec3 mount: mount: RPC: Remote system error - No route to host
Jan 3 16:18:02 sec3 netfs: Mounting NFS filesystems: failed

网络起来了,但是却没有route?

但是手动mount却完全没有问题。。。。

最后,想来想去,难道是网络没有完全起来就mount,所以mount不上。

于是,在rc.local里面加了一句:
mount -a

重启动,发现成功了。


rc.local执行的时间比较晚,这个时候network已经完全起来了,就可以了。




[留名 (1-3 16:38, Long long ago)] [ 传统版 | sForum ][登录后回复]1楼

这种tips是google都找不来的. 顶![SmellsLikeTeenSpirit (1-3 20:00, Long long ago)] [ 传统版 | sForum ][登录后回复]2楼

多嘴一句不如把那一行从fstab中删去,在rc.local中加入mount -t nfs .....[很硬 (1-5 11:10, Long long ago)] [ 传统版 | sForum ][登录后回复]3楼

(引用 很硬:多嘴一句不如把那一行从fstab中删去,在rc.local中加入mount -t nfs .....)说得很对。[留名 (1-6 9:21, Long long ago)] [ 传统版 | sForum ][登录后回复]4楼


<<始页  [1]  末页>> 
登录 | 首页 -> 华新鲜事 -> 技术の宅 | [刷新本页] | 切换到:传统版 / sForum