Marcio Merlone
2013-Jun-04 13:35 UTC
[Samba] Understanding re-sahring a NFS filesystem in Samba
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
Emmanuel Florac
2013-Jun-04 14:05 UTC
[Samba] Understanding re-sahring a NFS filesystem in Samba
Le Tue, 04 Jun 2013 10:35:33 -0300 Marcio Merlone <marcio.merlone at a1.ind.br> ?crivait:> 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?One of my customers has been running such a setup where a linux server re-exports an NFS share from another linux box for the past 2 years with about one hundred users. Never had a glitch. The only other accesses to this NFS share are rsync'ing them to another server for backup. -- ------------------------------------------------------------------------ Emmanuel Florac | Direction technique | Intellique | <eflorac at intellique.com> | +33 1 78 94 84 02 ------------------------------------------------------------------------