Can CTDB be used to create HA NAS reexporting NFS via Samba?

Alexander forsmbg at
Tue Jan 13 12:34:35 GMT 2009

Hello Samba team,

We use some of our Samba population to reexport NFS mounts via CIFS. I.e.
Samba being an NFS client and CIFS/SMB server sharing mounted NFS shares.
Bad idea and not recommended by Samba team, I know, but it's the way it was
setup some time ago for the purpose and it works absolutely fine for that.

The one exception that it's not the HA (High Availability) setup. At least
not the one we'd like to have. If a node fails then with current Linux
clustering abilities we can takeover the failed node's IP and start sharing
again but all the session information will be lost as CIFS is a stateful
protocol. For an interactive work it's not that big problem, because the
client can reconnect. But that will break any automated process (e.g. script
copying from/to Samba share) that was using Samba at that moment - the thing
I'm trying to avoid. I was watching closely the CTDB project since the very
beginning and guess that now it's worth playing with for me and has a
potential for production use. And looking at its features like that gentle
TCP session takeover and everything - it looks like a solution for a [kind
of] true non-stop fileserver.

But the idea of CTDB as I get it is to have the cluster filesystem shared
via multiple nodes.

NFS is far from a cluster fs, that's unquestionable, but at the same time
it's capable of serving several clients at once as long as it's the network
fs after all.
So could you please advise me if this idea makes sense before I dive into
test installations and verification? Can CTDB help in creating a HA
configuration of several Samba servers reexporting the same NFS mounts from
some other NFS server?

The scheme I mean is simple:

                          |--------> Samba node with CTDB ---->|
NFS server ------> |                                                     |
---> CIFS/SMB clients
                          |--------> Samba node with CTDB ---->|

More information about the samba-technical mailing list