Linux NFS服务器拒绝阻塞锁

所以我有这个问题。 这个可怕的,可怕的问题。

我有一套Linux NFS服务器(在使用CTDB的NFS / CIFS集群中),只有在锁被阻塞时才拒绝锁。 如果这是一个非阻塞的呼叫,它工作得很好。

查看下面的交通stream量:

lockinglocking电话:

9.414674 10.10.1.40 -> 10.10.1.14 NLM 282 V4 LOCK Call FH:0xf6b3519c svid:5 pos:0-0 nlm.lock.caller_name == "centos-ad2012r2" nlm.exclusive == 1 nlm.block == 1 9.415002 10.10.1.14 -> 10.10.1.40 NLM 106 V4 LOCK Reply (Call In 39) NLM_BLOCKED nlm.stat == 3 18.613965 10.10.1.40 -> 10.10.1.14 NLM 274 V4 CANCEL Call FH:0xf6b3519c svid:5 pos:0-0 nlm.lock.caller_name == "centos-ad2012r2" nlm.exclusive == 1 nlm.block == 1 18.614003 10.10.1.40 -> 10.10.1.14 NLM 266 V4 UNLOCK Call FH:0xf6b3519c svid:5 pos:0-0 nlm.lock.caller_name == "centos-ad2012r2" 18.614675 10.10.1.14 -> 10.10.1.40 NLM 106 V4 CANCEL Reply (Call In 55) NLM_DENIED nlm.stat == 1 18.614889 10.10.1.14 -> 10.10.1.40 NLM 106 V4 UNLOCK Reply (Call In 56) nlm.stat == 0 

非阻塞locking呼叫:

  47.476050 10.10.1.40 -> 10.10.1.14 NLM 282 V4 LOCK Call FH:0xf6b3519c svid:6 pos:0-0 nlm.lock.caller_name == "centos-ad2012r2" nlm.exclusive == 1 nlm.block == 0 47.476647 10.10.1.14 -> 10.10.1.40 NLM 106 V4 LOCK Reply (Call In 102) nlm.stat == 0 51.908995 10.10.1.40 -> 10.10.1.14 NLM 266 V4 UNLOCK Call FH:0xf6b3519c svid:6 pos:0-0 nlm.lock.caller_name == "centos-ad2012r2" 51.909700 10.10.1.14 -> 10.10.1.40 NLM 106 V4 UNLOCK Reply (Call In 112) nlm.stat == 0 

客户端是Centos 6.5

服务器是Scientific Linux 6.2

基础文件系统是Lustre。 这个问题可能与这个问题有类似/相同的原因:

asynchronouslocking接口为阻塞locking做了一些小事,而不是等待文件系统作出响应,它只是立即发送一个拒绝(即使locking实际上可用),然后在发现时使用授予的消息做出响应它是可用的。