Hi, i configured a running three node CTDB SAMBA cluster (hope so). Virtual ip's are floating between the nodes after faling one of them. Im using SAMBA 4.11.6 on Ubuntu 18.04. Samba was compiled from source. I configured some systemD start/stop scripts for samba (smbd, nmbd) and winbind, also disabled them for manage via ctdb. I enabled ctdb to mange samba and winbind via this description: https://wiki.samba.org/index.php/Configuring_clustered_Samba Now i can start/stop CTDB , SAMBA and winbind by using: # ctdbd_wrapper start/stop Now im trying to find a systemD script for CTDB . Is there somewherea template script flying through the internet? I installed CTDB on a other maschine by repo and tried to copy the start/stop script but this distribution provides only SysVinit script. Maybe you can hep here: ---- [Unit] Description=CTDB After=network.target remote-fs.target nss-lookup.target [Service] Type=forking ExecStart=??? PIDFile=??? [Install] WantedBy=multi-user.target ---- My CTDB is installed in: /usr/local/samba ... /usr/local/samba/sbin/ctdbd_wrapper /usr/local/samba/var/run/ctdb ... Thanks micha
On Tue, 2020-03-03 at 08:36 +0100, Micha Ballmann via samba wrote:> Hi, > > i configured a running three node CTDB SAMBA cluster (hope so). > Virtual > ip's are floating between the nodes after faling one of them. Im > using > SAMBA 4.11.6 on Ubuntu 18.04. Samba was compiled from source. I > configured some systemD start/stop scripts for samba (smbd, nmbd) > and > winbind, also disabled them for manage via ctdb. > > I enabled ctdb to mange samba and winbind via this description: > https://wiki.samba.org/index.php/Configuring_clustered_Samba > > Now i can start/stop CTDB , SAMBA and winbind by using: > > # ctdbd_wrapper start/stop > > Now im trying to find a systemD script for CTDB . Is there > somewherea > template script flying through the internet? I installed CTDB on a > other > maschine by repo and tried to copy the start/stop script but this > distribution provides only SysVinit script. > > Maybe you can hep here: > > ---- > > [Unit] > Description=CTDB > After=network.target remote-fs.target nss-lookup.target > > [Service] > Type=forking > ExecStart=??? > PIDFile=??? > > [Install] > WantedBy=multi-user.target > > ---- > > My CTDB is installed in: /usr/local/samba > > ... > > /usr/local/samba/sbin/ctdbd_wrapper > /usr/local/samba/var/run/ctdbWe do have a general standard systemd service file in our sources itself. Please see the following link(for tag samba-4.11.6): https://git.samba.org/?p=samba.git;a=blob;f=ctdb/config/ctdb.service;h=fd81c38e26daff89c3e220f19ea5df5f4c110278;hb=f5fa58a41774667a153dece74ed7e4a09689f0ad You may have to update some variables like PIDFile, ExecStart, ExecStop accordingly to point to non-standard installation paths.
Hi, i updated the variables for my scenario. But CTDB wont start: Mar? 3 09:50:50 ctdb1 systemd[1]: Starting CTDB... Mar? 3 09:50:50 ctdb1 ctdbd[24663]: CTDB starting on node Mar? 3 09:50:50 ctdb1 ctdbd[24667]: Starting CTDBD (Version 4.11.6) as PID: 24667 Mar? 3 09:50:50 ctdb1 ctdbd[24667]: Created PID file /usr/local/samba/var/run/ctdb/ctdbd.pid Mar? 3 09:50:50 ctdb1 ctdbd[24667]: Removed stale socket /usr/local/samba/var/run/ctdb/ctdbd.socket Mar? 3 09:50:50 ctdb1 ctdbd[24667]: Listening to ctdb socket /usr/local/samba/var/run/ctdb/ctdbd.socket Mar? 3 09:50:50 ctdb1 ctdbd[24667]: Set real-time scheduler priority Mar? 3 09:50:50 ctdb1 ctdbd[24667]: Starting event daemon /usr/local/samba/libexec/ctdb/ctdb-eventd -P 24667 -S 13 Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: daemon started, pid=24671 Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: startup completed successfully Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: listening on /usr/local/samba/var/run/ctdb/eventd.socket Mar? 3 09:50:50 ctdb1 ctdbd[24667]: Set runstate to INIT (1) *Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: 00.ctdb: /usr/local/samba/etc/ctdb/events/legacy/00.ctdb.script: 24: /usr/local/samba/etc/ctdb/events/legacy/00.ctdb.script: tdbtool: not found** **Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: 00.ctdb: WARNING: The installed 'tdbtool' does not offer the 'check' subcommand.** **Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: 00.ctdb:? Using 'tdbdump' for database checks.** **Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: 00.ctdb: Consider updating 'tdbtool' for better checks!** **Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: 00.ctdb: Persistent database /usr/local/samba/var/lib/ctdb/persistent/account_policy.tdb.0 is corrupted! CTDB will not start.* *Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: init event failed** **Mar? 3 09:50:50 ctdb1 ctdbd[24667]: ctdb exiting with error: Failed to run init event** **Mar? 3 09:50:50 ctdb1 ctdbd[24667]:** **Mar? 3 09:50:50 ctdb1 ctdbd[24667]: CTDB daemon shutting down** **Mar? 3 09:50:56 ctdb1 ctdb-eventd[24671]: PID 24667 gone away, exiting** **Mar? 3 09:50:56 ctdb1 ctdb-eventd[24671]: Shutting down** **Mar? 3 09:51:01 ctdb1 ctdbd_wrapper[24662]: Timed out waiting for initialisation - check logs** **Mar? 3 09:51:01 ctdb1 systemd[1]: ctdb.service: Control process exited, code=exited status=1** **Mar? 3 09:51:01 ctdb1 systemd[1]: ctdb.service: Failed with result 'exit-code'.** **Mar? 3 09:51:01 ctdb1 systemd[1]: Failed to start CTDB.* Do i need set some environment variable in */usr/local/samba/etc/ctdb/events/legacy/00.ctdb.script?* * * Am 03.03.2020 um 09:18 schrieb Anoop C S via samba:> On Tue, 2020-03-03 at 08:36 +0100, Micha Ballmann via samba wrote: >> Hi, >> >> i configured a running three node CTDB SAMBA cluster (hope so). >> Virtual >> ip's are floating between the nodes after faling one of them. Im >> using >> SAMBA 4.11.6 on Ubuntu 18.04. Samba was compiled from source. I >> configured some systemD start/stop scripts for samba (smbd, nmbd) >> and >> winbind, also disabled them for manage via ctdb. >> >> I enabled ctdb to mange samba and winbind via this description: >> https://wiki.samba.org/index.php/Configuring_clustered_Samba >> >> Now i can start/stop CTDB , SAMBA and winbind by using: >> >> # ctdbd_wrapper start/stop >> >> Now im trying to find a systemD script for CTDB . Is there >> somewherea >> template script flying through the internet? I installed CTDB on a >> other >> maschine by repo and tried to copy the start/stop script but this >> distribution provides only SysVinit script. >> >> Maybe you can hep here: >> >> ---- >> >> [Unit] >> Description=CTDB >> After=network.target remote-fs.target nss-lookup.target >> >> [Service] >> Type=forking >> ExecStart=??? >> PIDFile=??? >> >> [Install] >> WantedBy=multi-user.target >> >> ---- >> >> My CTDB is installed in: /usr/local/samba >> >> ... >> >> /usr/local/samba/sbin/ctdbd_wrapper >> /usr/local/samba/var/run/ctdb > > We do have a general standard systemd service file in our sources > itself. Please see the following link(for tag samba-4.11.6): > > https://git.samba.org/?p=samba.git;a=blob;f=ctdb/config/ctdb.service;h=fd81c38e26daff89c3e220f19ea5df5f4c110278;hb=f5fa58a41774667a153dece74ed7e4a09689f0ad > > You may have to update some variables like PIDFile, ExecStart, ExecStop > accordingly to point to non-standard installation paths. > >
> Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: 00.ctdb: WARNING: The > installed 'tdbtool' does not offer the 'check' subcommand.**> /usr/local/samba/var/lib/ctdb/persistent/account_policy.tdb.0 is > corrupted! CTDB will not start.*tdbtool .. Locate it and verify the version of it. That might be a start to get it fixed. Greetz, Louis> -----Oorspronkelijk bericht----- > Van: samba [mailto:samba-bounces at lists.samba.org] Namens > Micha Ballmann via samba > Verzonden: dinsdag 3 maart 2020 10:05 > Aan: Anoop C S > CC: samba at lists.samba.org > Onderwerp: Re: [Samba] start/stop ctdb > > Hi, > > i updated the variables for my scenario. But CTDB wont start: > > Mar? 3 09:50:50 ctdb1 systemd[1]: Starting CTDB... > Mar? 3 09:50:50 ctdb1 ctdbd[24663]: CTDB starting on node > Mar? 3 09:50:50 ctdb1 ctdbd[24667]: Starting CTDBD (Version > 4.11.6) as > PID: 24667 > Mar? 3 09:50:50 ctdb1 ctdbd[24667]: Created PID file > /usr/local/samba/var/run/ctdb/ctdbd.pid > Mar? 3 09:50:50 ctdb1 ctdbd[24667]: Removed stale socket > /usr/local/samba/var/run/ctdb/ctdbd.socket > Mar? 3 09:50:50 ctdb1 ctdbd[24667]: Listening to ctdb socket > /usr/local/samba/var/run/ctdb/ctdbd.socket > Mar? 3 09:50:50 ctdb1 ctdbd[24667]: Set real-time scheduler priority > Mar? 3 09:50:50 ctdb1 ctdbd[24667]: Starting event daemon > /usr/local/samba/libexec/ctdb/ctdb-eventd -P 24667 -S 13 > Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: daemon started, pid=24671 > Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: startup completed > successfully > Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: listening on > /usr/local/samba/var/run/ctdb/eventd.socket > Mar? 3 09:50:50 ctdb1 ctdbd[24667]: Set runstate to INIT (1) > *Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: 00.ctdb: > /usr/local/samba/etc/ctdb/events/legacy/00.ctdb.script: 24: > /usr/local/samba/etc/ctdb/events/legacy/00.ctdb.script: > tdbtool: not found** > **Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: 00.ctdb: WARNING: The > installed 'tdbtool' does not offer the 'check' subcommand.** > **Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: 00.ctdb:? Using 'tdbdump' > for database checks.** > **Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: 00.ctdb: Consider > updating > 'tdbtool' for better checks!** > **Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: 00.ctdb: > Persistent database > /usr/local/samba/var/lib/ctdb/persistent/account_policy.tdb.0 is > corrupted! CTDB will not start.* > *Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: init event failed** > **Mar? 3 09:50:50 ctdb1 ctdbd[24667]: ctdb exiting with > error: Failed to > run init event** > **Mar? 3 09:50:50 ctdb1 ctdbd[24667]:** > **Mar? 3 09:50:50 ctdb1 ctdbd[24667]: CTDB daemon shutting down** > **Mar? 3 09:50:56 ctdb1 ctdb-eventd[24671]: PID 24667 gone > away, exiting** > **Mar? 3 09:50:56 ctdb1 ctdb-eventd[24671]: Shutting down** > **Mar? 3 09:51:01 ctdb1 ctdbd_wrapper[24662]: Timed out waiting for > initialisation - check logs** > **Mar? 3 09:51:01 ctdb1 systemd[1]: ctdb.service: Control process > exited, code=exited status=1** > **Mar? 3 09:51:01 ctdb1 systemd[1]: ctdb.service: Failed with result > 'exit-code'.** > **Mar? 3 09:51:01 ctdb1 systemd[1]: Failed to start CTDB.* > > Do i need set some environment variable in > */usr/local/samba/etc/ctdb/events/legacy/00.ctdb.script?* > > * > * > > Am 03.03.2020 um 09:18 schrieb Anoop C S via samba: > > On Tue, 2020-03-03 at 08:36 +0100, Micha Ballmann via samba wrote: > >> Hi, > >> > >> i configured a running three node CTDB SAMBA cluster (hope so). > >> Virtual > >> ip's are floating between the nodes after faling one of them. Im > >> using > >> SAMBA 4.11.6 on Ubuntu 18.04. Samba was compiled from source. I > >> configured some systemD start/stop scripts for samba (smbd, nmbd) > >> and > >> winbind, also disabled them for manage via ctdb. > >> > >> I enabled ctdb to mange samba and winbind via this description: > >> https://wiki.samba.org/index.php/Configuring_clustered_Samba > >> > >> Now i can start/stop CTDB , SAMBA and winbind by using: > >> > >> # ctdbd_wrapper start/stop > >> > >> Now im trying to find a systemD script for CTDB . Is there > >> somewherea > >> template script flying through the internet? I installed CTDB on a > >> other > >> maschine by repo and tried to copy the start/stop script but this > >> distribution provides only SysVinit script. > >> > >> Maybe you can hep here: > >> > >> ---- > >> > >> [Unit] > >> Description=CTDB > >> After=network.target remote-fs.target nss-lookup.target > >> > >> [Service] > >> Type=forking > >> ExecStart=??? > >> PIDFile=??? > >> > >> [Install] > >> WantedBy=multi-user.target > >> > >> ---- > >> > >> My CTDB is installed in: /usr/local/samba > >> > >> ... > >> > >> /usr/local/samba/sbin/ctdbd_wrapper > >> /usr/local/samba/var/run/ctdb > > > > We do have a general standard systemd service file in our sources > > itself. Please see the following link(for tag samba-4.11.6): > > > > > https://git.samba.org/?p=samba.git;a=blob;f=ctdb/config/ctdb.s > ervice;h=fd81c38e26daff89c3e220f19ea5df5f4c110278;hb=f5fa58a41 > 774667a153dece74ed7e4a09689f0ad > > > > You may have to update some variables like PIDFile, > ExecStart, ExecStop > > accordingly to point to non-standard installation paths. > > > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba > >