The CTDB deployed /etc/ctdb/events.d/50.samba script contain the following code to detect the smbd/nmbd service name:
---
case $CTDB_INIT_STYLE in
suse) CTDB_SERVICE_SMB=${CTDB_SERVICE_SMB:-smb} CTDB_SERVICE_NMB=${CTDB_SERVICE_NMB:-nmb}
;;
debian) CTDB_SERVICE_SMB=${CTDB_SERVICE_SMB:-samba} CTDB_SERVICE_NMB=${CTDB_SERVICE_NMB:-""}
;;
*)
# Use redhat style as default: CTDB_SERVICE_SMB=${CTDB_SERVICE_SMB:-smb} CTDB_SERVICE_NMB=${CTDB_SERVICE_NMB:-""}
;;
esac
---
It detects Ubuntu as Debian (/etc/ctdb/functions) and so define that the smb service is named "samba" and the nmb service does not exists.
That could be OK since Samba deploy an "samba" init script as well as smbd and nmbd. Except, this init script does not really work to start smbd and nmbd.
To make CTDB happy, the previous code must be modified:
--- 50.samba.orig 2017-11-23 23:34:35.146314429 +0000
+++ 50.samba 2017-11-23 23:35:08.161814684 +0000
@@ -14,8 +14,8 @@
CTDB_SERVICE_NMB=${CTDB_SERVICE_NMB:-nmb}
;;
debian)
- CTDB_SERVICE_SMB=${CTDB_SERVICE_SMB:-samba}
- CTDB_SERVICE_NMB=${CTDB_SERVICE_NMB:-""}
+ CTDB_SERVICE_SMB=smbd
+ CTDB_SERVICE_NMB=nmbd
;;
*)
# Use redhat style as default:
I reproduced this issue on both Ubuntu 16.04 and 14.04. But it does not exists on Debian Stretch (the 50.samba has been updated).
An easier workaround to avoid updating the 50.samba script is to set those 2 service name in the /etc/default/ctdb:
The CTDB deployed /etc/ctdb/ events. d/50.samba script contain the following code to detect the smbd/nmbd service name:
CTDB_ SERVICE_ SMB=${CTDB_ SERVICE_ SMB:-smb}
CTDB_ SERVICE_ NMB=${CTDB_ SERVICE_ NMB:-nmb}
CTDB_ SERVICE_ SMB=${CTDB_ SERVICE_ SMB:-samba}
CTDB_ SERVICE_ NMB=${CTDB_ SERVICE_ NMB:-"" }
CTDB_ SERVICE_ SMB=${CTDB_ SERVICE_ SMB:-smb}
CTDB_ SERVICE_ NMB=${CTDB_ SERVICE_ NMB:-"" }
---
case $CTDB_INIT_STYLE in
suse)
;;
debian)
;;
*)
# Use redhat style as default:
;;
esac
---
It detects Ubuntu as Debian (/etc/ctdb/ functions) and so define that the smb service is named "samba" and the nmb service does not exists.
That could be OK since Samba deploy an "samba" init script as well as smbd and nmbd. Except, this init script does not really work to start smbd and nmbd.
To make CTDB happy, the previous code must be modified: SERVICE_ NMB=${CTDB_ SERVICE_ NMB:-nmb} SMB=${CTDB_ SERVICE_ SMB:-samba} NMB=${CTDB_ SERVICE_ NMB:-"" } SMB=smbd NMB=nmbd
--- 50.samba.orig 2017-11-23 23:34:35.146314429 +0000
+++ 50.samba 2017-11-23 23:35:08.161814684 +0000
@@ -14,8 +14,8 @@
CTDB_
;;
debian)
- CTDB_SERVICE_
- CTDB_SERVICE_
+ CTDB_SERVICE_
+ CTDB_SERVICE_
;;
*)
# Use redhat style as default:
I reproduced this issue on both Ubuntu 16.04 and 14.04. But it does not exists on Debian Stretch (the 50.samba has been updated).
An easier workaround to avoid updating the 50.samba script is to set those 2 service name in the /etc/default/ctdb:
CTDB_SERVICE_ SMB=smbd NMB=nmbd
CTDB_SERVICE_