Samba and NFS server on same system using same filesystems

Yogesh Kulkarni yoknfs at gmail.com
Fri Dec 9 18:45:55 UTC 2016


There are multiple issues here.

1. Oplocks and leases vs delegations is definitely one of them.
In simplest of scenario, the oplock/lease/delegation scenario occurs over
same file, same node and kernel oplocks might kick in.
However, I wonder what happens over a cluster ? NFSv4 asks for a delegation
over Node1, and windows client asks for an oplock on node 2.
AFAIK, there is no clustered integration between NFSv4 and Samba.
Perhaps is NFS-Ganesha + CTDB + Samba the answer ?

2. Byte range locks
3. Authentication and authorization ( AD, LDAP on the same share and
combination of thereof ) and ACL's.
4. NFSv3 - clients, opens being a nop, a known FH to read/write without any
regards to caching/locking
5. SMB create ( open ) does too many things that need addressing ( e.g
delete on close ) and perhaps nfs has similar mechanisms.

~yogesh


On Thu, Dec 8, 2016 at 8:27 PM, Nico Kadel-Garcia <nkadel at gmail.com> wrote:

> On Thu, Dec 8, 2016 at 11:11 AM, Volker Lendecke <vl at samba.org> wrote:
> > On Thu, Dec 08, 2016 at 09:39:48AM -0600, Ron Short wrote:
> >> What issues might one run into having both a NFS server and a Samba
> >> configuration running on the same system serving out the same
> filesystem(s)?
> >
> > It should work fine as long as you don't actually have interoperating
> > applications that require any form of interoperable locking.
>
> I've done it. I've also done it transitively, with a NetApp publishing
> NFSv4 shares to a Samba server for general NFS performance, and Samba
> publishing CIFS shares on top of the NFSv4. That got.... well, NFSv4
> support and integration with Samba is *possible*, but they don't
> exactly match. It was much more stable, but not accepted by my
> employer, to use NFSv3 for *everything* to simplify privileges and
> gain performance, and activate NFS support on the Windows boxes.
>
> I realize that's not what Samba was written for, but it was more
> stable at the time (roughly 6 years ago) to rely on NFS and simple
> POSIX credentials rather than support the complexities. NFSv4 support
> may have improved since then.
>
> > For example samba hands out oplocks, nfsv4 I believe calls them
> > delegations. When a SMB client has an oplock, and an NFS client wants
> > that file, the NFS server must somehow trigger samba to release the
> > oplock. This is done on Linux with kernel oplocks. Similar issues
> > arise with share modes vs share reservations.
> >
> > In general, if you don't have applications that actually compete on
> > the same file space, you should be fine. But if you do, we need to
> > talk :-)
> >
> > Your mail address is sgi.com. Is this IRIX, or Linux, or something
> > else? Just curious...
> >
> > Volker
>
>


More information about the samba-technical mailing list