How Can I make a NFS Cluster + ctdb work?

Martin Schwenke martin at meltin.net
Tue Jan 5 23:55:33 UTC 2016


Hi Pablo,

On Tue, 5 Jan 2016 17:17:11 -0300, Pablo Silva <psilva at bbr.cl> wrote:

>      I've just to read the ctdb + NFS tutorial without success,
> 
> https://ctdb.samba.org/nfs.html
> 
> http://wiki.samba.org/index.php/CTDB_Setup#Setting_up_CTDB_for_clustered_NFS
> 
>    But, i'm lost...,I could successfully set ctdb + gluster, but not much documentation 
> accompanying how NFS. Thanks in advnace for any hint. -Pablo

For NFS, CTDB will do a few things:

* Start and stop your NFS service

* Manage public IP addresses failover

* Reset NFS TCP connections on failover

  CTDB only registers NFS connections during the monitor event, so
  every 15 seconds by default.  So, if you mount an export from a
  client and immediately test a failover then the connection may not
  get reset as expected.

  We have had some thoughts of using conntrack (or similar) to allow
  more reliable track of NFS connections, but it hasn't been a priority.

* Handle client notification for locking, so locks are re-taken after
  failover.

  Depending on the version that you are running, this code may perform
  incredibly badly.  We have rewritten it a few times and we believe
  the latest version is good.  :-)

One other thing worth mentioning is that you can't test NFS failover by
just killing ctdbd on one node.  If you want to simulate a node crash
then also drop all the public IP addresses from the node after killing
CTDB, otherwise you will end up with duplicate IP addresses. If you
want to protect against CTDB crashing then you need some sort of
watchdog, perhaps the included ctdb-crash-cleanup.sh script run
regularly from cron.

I hope some of that helps... please let use know...   :-)

peace & happiness,
martin



More information about the samba-technical mailing list