由于mount / nfs进程挂起/ etc / mtab〜lock文件,automount停止工作

我在LDAP中有很多automount条目,用于在彼此之间安装〜200个节点。 自动挂载程序经常停止工作。 debugging后,我发现它可以通过运行修复

rm -f /etc/mtab~* restart autofs 

这让我想,存在mount.nfs进程无法删除locking文件(它们有时称为/etc/mtab~.[0-9]*),这会阻止下列安装请求成功。 作为一个解决方法,我有一个cron作业,删除locking文件,但有时为时已晚。

现在的细节:

 System: Linux 2.6.32-33-server #70-Ubuntu SMP Thu Jul 7 22:28:30 UTC 2011 x86_64 GNU/Linux automount -V: 5.0.4 mount.nfs -V: linux nfs-utils 1.1.6 

LDAP条目(相关行):

 objectClass: automount cn: myhost automountInformation: -soft myhost:/var/tmp 

一个成功的挂载看起来像这样(mount | grep auto):

 myhost:/var/tmp on /var/autofs/net/myhost type nfs (rw,soft,sloppy,addr=10.xxx) 

每当我访问一个新的挂载点时,自动挂载程序会产生以下进程(ps .. | grep挂载)

 /bin/mount -t nfs -s -o soft -f myhost:/var/tmp /var/autofs/net/myhost /sbin/mount.nfs myhost:/var/tmp /var/autofs/net/myhost -s -f -o rw,soft 

如果我尝试手动运行命令,我得到以下消息:

 Cannot create link /etc/mtab~ Perhaps there is a stale lock file? 

随后每个对自动加载器的请求都失败。

我现在的问题是,如果mount.nfs进程无法删除mtab〜lock文件以允许所有主机相互安装,那么如何让自动加载程序正确运行? 这是LDAP,NFS,automounter或mount.nfs选项的问题吗?

请帮我解决这个问题!