homes on NFS: Failed to lock

Lennart Regebro regebro at nuxeo.com
Wed Feb 23 12:59:01 UTC 2005


Hi All. I have the same mentioned problems with locks...

> As I understand it, Linux has been historically poor at interacting with
> NFS from Unix. In addition, GNOME does not do well with an NFS mounted
> home dir.

I have an NFS mounted home dir, and theres not much I can do about that...

> That being said, I think if you enable exclusive locking on the NFS
> server it should work fine. I think gnome-vfs requires that it be able
> to have a lock on certain files in your home dir.

As far as I can tell, it is enabled. But if somebody can tell me how to 
make 100% sure, I'd appreciate that.

This perl script runs successfully, I don't know if that sais anything:

#!/usr/bin/perl
use Fcntl ':flock'; # import LOCK_* constants
print("Just before opening file.\n");
open(LOCKFILE,">testlockfile") or
   die "Error: Could not write to lock file: testlockfile: $!\n";
   print("Just before locking file.\n");
   flock(LOCKFILE,LOCK_EX);
   print("Just before unlocking file.\n");
   flock(LOCKFILE,LOCK_UN);
   print("All done.  File locked and unlocked.\n");
   unlink("testlockfile");
   exit(0);

-- 
Lennart Regebro, Nuxeo     http://www.nuxeo.com/
CPS Content Management     http://www.cps-project.org/




More information about the ubuntu-users mailing list