1

I want to check the existence of file lock on a file in gluster file system. So that I can see from any host that whether file lock is held by any process (remote or local) on file in gluster file system.

For Example: I have two host: h1 and h2, both with RHEL 7.2. I have one application on host h1 which has acquired the file lock on a file in gluster file system using pthread_rwlock_wrlock API. After sometimes I poweroff host h1.

Now from h2 I am using pthread_rwlock_trywrlock to see whether any lock is held on this file or not. this retuning me EBUSY till 30 minutes of poweroff of h1(its looking as if application from h1 has still held lock on it). After around 30 minutes pthread_rwlock_trywrlock returning 0.

Is there any way I can quickly check that a file in gluster is held by any any process or not?

dcds
  • 932
  • 4
  • 13
  • 23

1 Answers1

0

After tuning below gluster volumes parameter it worked.

network.frame-timeout 30
network.ping-timeout 5
server.keepalive-time 5
server.keepalive-interval 2
server.keepalive-count 2
server.tcp-user-timeout 5

After above parameter tuning of gluster volumes. I am seeing application on remote host able to detact lock existence on a lock file in glusterfs in within 10 sec on VM poweroff.

dcds
  • 932
  • 4
  • 13
  • 23