Linux 启动时 nfs服务启动慢的问题的解决

 

 Redhat9.0的VMWare虚拟机启动的时候,在启动NFS服务时候停留很长时间。

于是google一下,发现解决方法如下:
  因为每次客户端mount过NFS而又没有正常umount后,在/var/lib/nfs/rmtab里会留下记录;

每次NFS启动的时候都会去check以前的IP,如果不通,要等到timeout才行。

cat rmtab看一下,很多用过的IP都在里面记着,难怪慢的象蜗牛一样!

清空了后试了一下,马上就起来了!

 


.
Slow Reboots of NFS Server

After several years of use, the server for my development machines developed a problem.

If I rebooted the machine without an internet connection, it would pause for several minutes while starting the NFS service.

 

The Linux NFS server keeps track of status in several files.

Whenever a client mounts a filesystem, the server records this in /var/lib/nfs/rmtab.

If the server reboots, exportfs passes this list to the kernel to ensure that the reboot is invisible to the clients. So far, this is harmless.

 


If the server is used with clients that do not send clean unmount requests, such as diskless machines in a development lab,

 then rmtab fills up with entries for machines that aren’t around anymore. This is mostly harmless.

 


The final part of the problem is that on reboot exportfs performs a reverse DNS lookup for each entry in rmtab.

If the DNS server is unavailable, the request waits for a timeout. This can take a very long time.

 


And the moral of the story? If NFS clients come and go on your network, check rmtab for clutter.

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值