Linux – Windows hangs accessing a samba share with nfs backend

linuxnfssamba

I have a somewhat less than ideal situation that requires me to mount a file system over NFS and then turn around and share that same file system over SAMBA to the rest of the users on my network.

---------                ------------                        ------------------
-   NAS - <----NFS-----> -  Server  - <------ SAMBA -------> - Windows Client -
---------                ------------                        ------------------

I've had no problems accessing the mount through SFTP or just moving files around from the local disc to the mount. When someone tries to copy a file out to the mount through windows file sharing explorer becomes unresponsive and eventually just fails. Even browsing through the directories out there can cause explorer to hang quite frequently.

I've seen some articles that suggest there might be a problem with locking but whenever I try to change those settings (locking, oplocks, kernel oplocks, static locking, etc…) either there's no difference in the behavior the samba becomes completely unresponsive and doesn't produce an error log.

Best Answer

I appear to have resolved my issue. The problem was in fact a locking issue. I'm still not sure why I was unable to turn off locking in SAMBA (although that appears it might be an issue with debian specifically) but turning off locking on the NFS mount solved my problem.

mount -t nfs 10.0.0.1:/mnt/path /mnt/path -o nolock