[Samba] Understanding re-sahring a NFS filesystem in Samba

Marcio Merlone marcio.merlone at a1.ind.br
Tue Jun 4 07:35:33 MDT 2013


Greetings,

I made some search on Google regarding this matter and found many 
diverse information, some dated back to 2004, and would like to update 
and clarify this issue. The question is: "what's the problem on 
re-sharing a NFS filesystem with Samba?".

The only way I found to share a NFS mount point on Samba without 
apparent problem is to disable file locking on NFS mount by using the 
"nolock" option on fstab. It seems to work fine, but some say it is a 
receipt to disaster, while others says it is good to go.

As I understand, if a shared NFS filesystem is mounted on two different 
servers with nolock option, I will probably run in troubles with 
concurrent file access.

FreeNAS --NFS-nolock-->Client1
--NFS-nolock-->Client2

Similarly, if a shared NFS filesystem, mounted on a second server, is 
shared by this second server via Samba, I may come accross the same 
problem due to simultaneous file access without lock, one by the NFS 
server and other by Samba server.

FreeNAS --NFS-nolock--> Server --smbd--> Client

If such filesystem is used for write operations only by Samba and no one 
else, neither the NFS server or other processes on Samba server, would 
the nolock option on NFS or the re-sharing by Samba be an issue? What 
are the expected problems one could find in such setup and what cares 
should be taken to use this and still have a good night sleep? Is there 
an alternative/preferred setup?

Would love to hear your considerations and technical expertise. For 
reference, here is the respective question I made on FreeNAS forums:
http://forums.freenas.org/showthread.php?13037-FreeNAS-NFS-share-mounted-on-Ubuntu-samba-server&p=61416#post61416

Best regards.

-- 
Marcio Merlone


More information about the samba mailing list