NFS and Samba file locking

Jeremy Allison jallison at
Fri Jan 30 23:37:22 GMT 1998

Eric Knudstrup wrote:
> We have a Solaris system running Samba that will also be sharing its
> files via NFS to other Solaris systems.
> Will Samba make sure that file locks are maintained acrossed the two?


	Samba maintains consistant file locks using
the system fcntl locking calls, so this should work
correctly across nfs mounted drives (so long as your
system's rpc.lockd works correctly).

However, you should make sure to turn off oplocks
on the Samba share if you are expecting to access
the same data from a unix process as the PC clients
are accessing, as, although Samba keeps oplocks
consistant between PC clients, it cannot keep
oplocked files consistant between PC clients
and unix clients with out kernel help (refer 
to the thread on oplocks already discussed on this
list for full details).

Hope this helps,

	Jeremy Allison,
	Samba Team.

Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.

More information about the samba mailing list