# default is to not manage Samba
# CTDB_MANAGES_SAMBA=yes
+# you may wish to raise the file descriptor limit for ctdb
+# use a ulimit command here. ctdb needs one file descriptor per
+# connected client (ie. one per connected client in Samba)
+# ulimit -n 10000
+
# the NODES file must be specified or ctdb won't start
# it should contain a list of IPs that ctdb will use
# it must be exactly the same on all cluster nodes
smb_dirs=`testparm -st 2> /dev/null | egrep '^\s*path = ' | cut -d= -f2`
ctdb_wait_directories "Samba" $smb_dirs
+ # make sure samba is not already started
+ service smb stop > /dev/null 2>&1
+ service winbind stop > /dev/null 2>&1
+
# start Samba service
service smb start
service winbind start
/bin/mkdir -p /etc/ctdb/state/statd/ip
ctdb_wait_directories "nfslock" "$STATD_SHARED_DIRECTORY"
+ # make sure the service is stopped first
+ service nfslock stop > /dev/null 2>&1
service nfslock start
;;
nfs_dirs=`grep -v '^#' < /etc/exports | cut -d' ' -f1`
ctdb_wait_directories "NFS" $nfs_dirs
+ # make sure nfs is stopped before we start it, or it may get a bind error
+ service nfs stop > /dev/null 2>&1
service nfs start
;;
if (state->child == 0) {
close(state->fd[0]);
ctdb_set_realtime(false);
+ set_close_on_exec(state->fd[1]);
va_start(ap, fmt);
ret = ctdb_event_script_v(ctdb, fmt, ap);
va_end(ap);