[Samba] Can CTDB respawn Samba?

David Disseldorp ddiss at suse.de
Thu Apr 5 09:38:55 MDT 2012

Hi Nicolas,

On Tue, 03 Apr 2012 16:21:22 +0200
Nicolas Ecarnot <nicolas at ecarnot.net> wrote:

> There a builtin method for ctdb to monitor smb - My log files are 
> showing me that the port 445 gets monitored, and ctdb becomes unhealthy 
> when it fails to reach it.
> But is there a builtin method to react to such event and restart samba 
> daemon?

Not builtin AFAICT, there are a couple of options though.
- Parse the output of ctdb status, checking for UNHEALTHY node status.
  Restart ctdbd if detected, which results in an smbd restart.
  This (crude) method is used by newer versions of the Linux-HA CTDB
  resource-agent - http://linux-ha.org/wiki/CTDB_%28resource_agent%29
- Intercept transition to UNHEALTHY state by specifying a

Detecting specifically for the presence of smbd in the above methods
should be easy enough using `ctdb eventscript monitor/startup`.

Cheers, David

More information about the samba mailing list