[Samba] Make CIFS look like NFS

Edward Ned Harvey samba at nedharvey.com
Mon Jun 8 22:00:52 GMT 2009

> > NFS is a more native network filesystem for unix machines, so it
> really only makes sense to use samba if you have some compelling reason
> not to use NFS.  Do you have some reason NFS would be bad in this case?
> >
> I had tried NFS previously - and didn't enjoy it.  I had numerous
> lockups.  Samba appeared to provide a much more fault-tolerant
> environment.  I will admit it's possible there were physical
> connectivity issues that have since been corrected.

That sheds a whole new light on it - you're definitely going about this
wrong, if you are doing unix-to-unix filesharing and you expect cifs to be
better than nfs...  You should instead concentrate your effort on
configuring NFS right.  If it's configured right, NFS is the more resilient
protocol.  You can even reboot the NFS server in the middle of file
operations, and there will be no problem (just a delay) on the client.

The reason to use samba is primarily sharing with windows, but to a lesser
extent, some other OSes.  Samba is after all, reverse-engineered Microsoft
cifs.  MS created it, and the only reason anyone else uses it is for the
sake of MS compatibility.

Assuming you're on Linux, I'll suggest the following NFS options in your
exports file, and then I think I better butt-out, because this is a samba
mailing list:

man exports
	# On a server that has a caching raid controller card, you want
	# On a server that has a simple disk, you want async (no_wdelay has
no effect, so you can omit it.) 

And I'll suggest the following options on the nfs client:
Use automount.  Assuming automount 5 you can use auto.direct as below,
otherwise create an automount directory as expected in automount 4.
		/-  /etc/auto.direct --timeout=1200
		/share -fstype=nfs,rw,hard,intr,posix  fileserver:/share

If you take my advice here, you'll have a NFS hard mount on the client
(therefore resilient) combined with interruptable auto dismount (therefore
self healing).  This is the config that I deploy to all the locations where
I do their IT, because after zillions of hours of manual reading, testing
and usage - it's a tried & tested rock solid config for linux-to-linux

More information about the samba mailing list