Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.3: NFS-located home folders may cause locking problems System
After installing Panther, I logged in only to find that Mail was hung, as was the Address Book and iChat. After a good deal of hunting around and judicious use of ktrace and kdump, the problem seemed to be that Address Book was failing to lock files in ~/Library -> Application Support -> Address Book, and was hanging while trying. The address book is also used by Mail and iChat, hence they also hung.

In the first instance, I managed to get things going by linking the Address Book directory onto a local filesystem and that at least got things working, although the locking was now failing instead of hanging the apps. Further research led me to the NFS Manager application and its release notes, where it says:

Programs accessing the address book cannot be launched by users of Mac OS X Panther if their private home folder was placed on a non-Apple NFS server: If you are using Mac OS X 10.3 "Panther" and have your private folder (home directory) on a third-party NFS server, problems can arise when starting an application that accesses the address book. Among others, the applications Address Book, iChat, and Mail are affected. Mac OS X 10.3 uses POSIX advisory file locks to open the address book database. Some NFS servers are not compatible with the implementation of NFS locking used by Apple. The lock fails and the calling applications hangs.

Workaround: Switch off all NFS locking features with the menu item "Computer -> Change NFS Locking" and restart the client computer. Another alternative is to use an NFS file server compatible with the locking features of Mac OS X 10.3.

This described our problem exactly and using their application solved the problem perfectly. Thanks!

Read the rest of the hint for a bit more info on the hunt for a permanent solution to this problem...

I have done some research trying to find some mods to lockd under Linux which will fix this problem properly (turning off locking doesn't fix the problem, it avoids it) but I am yet to find a fix for the Debian distribution that we run on our office NFS server. I haven't managed to locate the Darwin lockd code so that I can fit that same locking mechanism into the Linux locking code.

Linux does log the error, you will find the message:

Oct 27 13:57:09 numbat kernel: lockd: bad cookie size 20 (only cookies under 8 bytes are supported.)
through /var/log/kern.log on your Linux NFS server. I have not been able to find what version of NFS Apple is distributing with 10.3, just that it's "higher performance". Hmmm, when it works. Much frustration and angst went into discovering the cause of this problem. I hope this helps someone else.
  • Currently 2.86 / 5
  You rated: 4 / 5 (7 votes cast)

10.3: NFS-located home folders may cause locking problems | 8 comments | Create New Account
Click here to return to the '10.3: NFS-located home folders may cause locking problems' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
FreeBSD is fully compatible.
Authored by: rorya on Nov 02, '03 12:04:15PM

It should be noted that not all third party NFS servers are incompatible with the locking mechanism. FreeBSD NFS servers work just fine. I suspect this is probably because Darwin uses FreeBSD's NFS implementation to some degree.

"Any sufficiently advanced technology is indistinguishable from magic" - Arthur C. Clarke

[ Reply to This | # ]
FreeBSD is fully compatible.
Authored by: RikSca on Nov 03, '03 12:13:35PM

I've never been able to get NFS to work between my FreeBSD server and my Mac OS X box (I had been using SMB, which stopped working recently).

Does anyone know of any documentation to point me in the right direction to get this to work.

[ Reply to This | # ]
Same here
Authored by: stuartbryson on Nov 02, '03 06:18:30PM

We are experiencing the same problem here at work. Under Jaguar, we had all the home directories on a linux server (2.4.22) and it worked fine. Under Panther it is exactly as you say. Symlinking the Application Support/AddressBook to a local drive or even an SGI NFS server fixed the problem.

We are now in the process of patching and trying different kernels to try to get it working. Let us know if you have any success - as will I.

[ Reply to This | # ]
10.3: NFS-located home folders may cause locking problems
Authored by: rmitch on Nov 04, '03 11:50:18PM

We are having another, possibly related, problem...

After installing 10.3 we can no longer login to accounts with home directories on an NFS mounted partition. In our case all our home directories are located on a Network Appliance F840. When we try to login we get the spinning beach ball for a few seconds then we get an error message that says something like "you are not allowed to login because your home directory is located on an afs or smb share". It is not, it is located on an NFS share. We then get the login window once again.

If we login to an account with the home directory on the local hard drive, all is well, and in fact the Netapp NFS partition shows up, and we can navigate to it etc. We setup netinfo under 10.2 to specify that certain network accounts have home directories located on an NFS partition.

I have tried turning off posix locking as suggested in this hint, but that did not fix this problem.

Any help appreciated.

[ Reply to This | # ]
10.3: NFS-located home folders may cause locking problems
Authored by: alblue on Nov 26, '03 07:00:31PM

The solution to this problem can be easily achieved by editing the /etc/hostconfig file. Simply find the line that says:


and change it to


Then restart the computer, and it will not attempt to lock files.

I have also found other unrelated problems with NFS if the client computer cannot resolve the group/uid on the client computers.

[ Reply to This | # ]
10.3: NFS-located home folders may cause locking problems
Authored by: frankc on Dec 20, '03 04:18:24PM
On this page the maintainer of the linux nfs code has a patch called linux-2.4.23-03-fix_osx.dif. This patch should be applied on the linux server, and your problems should go away. I must say that I'm more comfortable with a working lockd implementation (fe mozilla will work in the right way when downloading to a nfs directory etc)

[ Reply to This | # ]
10.3: NFS-located home folders may cause locking problems
Authored by: sgmd on Feb 06, '04 08:52:13AM
To disable NFS locking append this line
to /etc/hostconfig

[ Reply to This | # ]
10.3: NFS-located home folders may cause locking problems
Authored by: Anonymous on Oct 20, '04 07:00:05PM
A Linux patch for this problem went into the mainstream kernel in March 2004, in the 2.4.26-pre3 kernel. Article here.
It will take some time for this to trickle down into the major distributions.
I noticed this problem because MS Office 2004 hangs when locking (just like the Address Book).
Please help find my missing daughter

[ Reply to This | # ]