# NFS -> Samba file locking problem [solved]

## mh

Hi, I'm having some NFS/Samba problems...

I have a NFS server that exports a few dirs to another server which then shares its NFS mounts via Samba to a network of Windows clients. The NFS server was just put online. Everything looked good on the windows clients until I started using Word documents stored on those samba shares. Some of them, I could no longer open. Windows would give me "out of disk space" and memory errors when the mem on client/server is fine and there's plenty of disk space (no quotas). this problem only happens on newer (office 2000) documents (95 docs are fine) and on no other type of file.

Looking in the logs, whenever I get this error, the following shows up:

 *Quote:*   

> No locks available error. This can happen when using 64 bit lock offsets
> 
> [2005/10/24 14:57:00, 0] locking/posix.c:posix_fcntl_lock(659)
> 
>   on 32 bit NFS mounted file systems.

 

I see lots of problems relating to this on google and on the samba lists, but no one's ever posted a solution. Some things I've found point to it being that NFS is only aware up to 31bits, but samba believes its 64 bit capable and then uses a 64 bit lock. 

Here is my smb.conf:

```
[global]

        workgroup = GROUP

        netbios name = SAMBASERVER

        server string = OC Storage

        security = DOMAIN

        password server = PDC, BDC

        log file = /var/log/samba/log.%m

        max log size = 50

        name resolve order = wins bcast

        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

        os level = 60

        preferred master = Yes

        domain master = Yes

        dns proxy = No

        wins server = 192.168.2.10

        remote announce = 192.168.1.255/GROUP

        remote browse sync = 192.168.1.255

        create mask = 0660

        directory mask = 0770

[homes]

        comment = Home Directories

        valid users = %S

        read list = %S

        write list = %S

        read only = No

        browseable = No

[Common]

        comment = temp

        path = /shares/common

        valid users = +users

        read list = +users

        write list = +users

        force user = root

        force group = +users

        read only = No

[wordproc]

        comment = Word Processing Share

        path = /shares/wordproc

        valid users = +wp, +wpreadonly

        read list = +wpreadonly

        force user = root

        force group = wp

        read only = No
```

Ive tried locking = No for the Common share, and that seems to fix the problem... but that also leaves the possiblitly of file corruption open... also users might hammer each others files if they leave things open. locking = No doesnt work for homes. I've even tried oplocks with no success.

If the users save the doc locally and then manually copy it over, it works fine. It just doesnt seem to like Word! 

Both machines are pretty new. The NFS server is a 64bit opteron with the latest Gentoo, the Samba server is a 32bit Xeon thats fairly up to date. Samba is 3.0.10 and NFS is current. Could the problem be the NFS servers arch?

has anyone had this problem? thanks

----------

## mh

it turns out that rpc.statd wasnt working. so i manually restarted it doing /sbin/rpc.statd. apparently, netmount is in the default runlevel and it doesnt start rpc.statd. nfsmount however does.

----------

