Problem with file locking on nfs mounted filesystem

Problem with file locking on nfs mounted filesystem

Post by Leonard Even » Thu, 14 Oct 1999 04:00:00

This started with a problem with Maple which we have on a file
system which is nfs mounted from a server.  This worked fine
until recently, but now on some of our systems, maple has
a problem when invoking help.  We've isolated the problem
so that it no longer is specifically a maple problem except
that for some odd reason maple is trying to lock the help

What happens is the following.  We are running RH6.0 on our
server with a 2.2.12 kernel and the knfsd-1.2.2-4 nfs server
package.  From machines running RH5.2 and kernels 2.0.36 or earlier,
we appear to be able to lock files in the nfs mounted directory
using a fcntl call.  But on machines running  RH.6.X and more
up to date kernels, we can't.  However, for a directory
mounted from another server, running  RH6.0 and a 2.2.5 kernel, we
can lock files.

Can anyone enlighten us as to what is going on?


Dept. of Mathematics, Northwestern Univ., Evanston, IL 60208


1. ksh hangs attempting to lock history file on NFS mounted file system

We have a bunch of Unixware users, mostly running 1.1.4, who are having
this problem (ksh hangs, investigation shows it is in the process of
trying to lock the history file)

I have offered them this workaround:


There is a ksh bug that causes ksh to hang when a user has multiple shell
processes trying to share a history file in a NFS mounted directory, e.g.
the user's home  directory.

Recommended fix: use this line in .profile:

    HISTFILE=/tmp/.history.$$; export HISTFILE

This causes a different history file to be created for each process.


I use this myself all the time and have never experienced the problem.
I prefer to have a separate history for each process, but some of our
users here really like to have one big history file shared by all

Is there a Unixware 1.1 patch for this?


Computing and Telecommunications Services       Unix System Administration Team       303-538-4821

Internet User #19075 of the Citizens Internet Empowerment Coalition

2. Lockup on AST 950

3. Frequency of NFS lock problems w/ NFS mounted mail spool

4. pppd problems after kernel rebuild

5. problems printing files from NFS mounted filesystems

6. iptables vs ipchains and aliased ethernet ports

7. 2.4.2-SMP: problem locking nfs files mounted on HPUX (ENOLCK)

8. SSI's no longer working

9. NFS locking routines do not invoke the filesystem lock operation

10. How to enable file lock on NFS filesystem?

11. Mounting PC's filesystem as UNIX filesystem with NFS

12. File Locking across NFS mounts