File locking problem over NFS

File locking problem over NFS

Post by David Lloy » Thu, 29 Jul 1999 04:00:00



I have a problem with file locking on a filesystem which is served from
a FreeBSD server (3.2-RELEASE) to SGI clients.

It actually manifests itself as the spellchecker for netscape not
working.

The netscape software is served from the FreeBSD machine.

Running par on the SGI to trace the system calls shows this:

open("/hosts/ingrid/software/netscape/netscape4.61/spell/pen4s324.dat",
O_RDONLY, 0777)
END-open() = 25
fcntl(25, F_GETLK, 0x7fff0ce0)
END-fcntl(25, F_GETLK, 0x7fff0ce0) errno = 46 (No locks available)
close(25) OK
close(25) errno = 9 (Bad file number)
open("/hosts/ingrid/software/netscape/netscape4.61/spell/pen4s324.dat",
O_RDONLY, 0777)
END-open() = 25
fcntl(25, F_GETLK, 0x7fff0ce0) errno = 46 (No locks available)
close(25) OK
close(25) errno = 9 (Bad file number)

(/hosts/ingrid/software is the nfs filesystem on the freebsd machine)

If the software is served from another SGI it doesn't give an error:

open("/hosts/mainman/export/software/netscape/netscape4.61/spell/pen4s324.dat",
O_RDONLY, 0777)
END-open() = 26
fcntl(26, F_GETLK, 0x7fff0f18)
END-fcntl(26, F_GETLK, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0})
OK
close(26) OK

Is the problem in the NFS or UFS? The mount on the sgi is:

ingrid:/software on /hosts/ingrid/software type nfs
(vers=3,nosuid,nodev,dev=10000d)

on the BSD machine it is:

/dev/vinum/soft_stripe on /software (NFS exported, local, writes: sync
54462 async 445902)

What else should I be looking for?

Cheers,
David

--
--------------------------
David Lloyd
Systems Group
The Moving Picture Company

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

 
 
 

File locking problem over NFS

Post by Tony Finc » Thu, 29 Jul 1999 04:00:00



>I have a problem with file locking on a filesystem which is served from
>a FreeBSD server (3.2-RELEASE) to SGI clients.

FreeBSD doesn't support file locking over NFS.

Tony.
--


 
 
 

File locking problem over NFS

Post by David Malo » Thu, 29 Jul 1999 04:00:00



>I have a problem with file locking on a filesystem which is served from
>a FreeBSD server (3.2-RELEASE) to SGI clients.

FreeBSD doesn't support NFS file locking yet. It does come with a lockd
which fakes it by always saying "Sure - have a lock". You can set it to
be started from rc.conf.

        David.

 
 
 

File locking problem over NFS

Post by Nick Hilliar » Tue, 10 Aug 1999 04:00:00



> The manpage of 'rpc.lockd' doesn't mention faking locks anymore...

No, but the entry in /etc/defaults/rc.conf says:

: rpc_lockd_enable="NO"           # Run NFS rpc.lockd (*broken!*) if nfs_server.

It should go into details, though.

Nick

 
 
 

1. More mail file locking questions (lockf, NFS, /var/spool/mail/*.lock)

        Here's a problem I've run into:

        The problem I've seen relates to building mh-6.8 for SVR4
        (and correspondingly LOCKF). Now, it appears that while
        INC believes the mail file (NFS mounted) should be
        locked, it isn't (or it is lockf'ed and someone else
        [/bin/mail?] isn't honoring the lock; it says something
        like "New mail has arrived.."). It appears that /bin/mail
        (on 4.1.x and Solaris 2.x) uses lock files
        (/var/spool/mail/*.lock).  

        My question is, should mh ({l}emacs, popper,imap,...)
        use this style (and abandon lockf), or is there some
        other appropriate solution to this problem?

        Thanks,

        Dave    

        David M. Meyer                  Voice:     503/346-1747
        Senior Network Engineer         Pager:     503/342-9458
        Office of University Computing  FAX:       503/346-4397

        University of Oregon
        1225 Kincaid
        Eugene, OR 97403        

2. KDE : Cannot create file 'HOME/Desktop"

3. nfs very slow, locking files across nfs ?

4. Why does my 486 DX2 66 register 0.78 BogoMips (no turbo switch) ?

5. NFS File locking problems

6. Linux vs DOS/Win , OS/2 , NT

7. File Locking on NFS files

8. Getting back lost disk space

9. Problems with nfs file locks under Solaris 2.5

10. NFS file locking problems

11. Problem with file locking on nfs mounted filesystem

12. NFS and File Locking Problem

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