RHEL6 init.d script (was Re: Initscript Debian Wheezy)

Ricky Nance ricky.nance at weaubleau.k12.mo.us
Thu Sep 6 09:23:03 MDT 2012

Marc, odd thing happened to me just now. I just spent the last 20 mins
troubleshooting slow/unresponsive windows machines (across the network)
because smbd 'hung' and samba had died (well I had restarted it and smbd
didn't die as it should have). Not trying to be snide with this, but please
explain to me again how this can't happen? Check the last couple of lines
here http://paste.ubuntu.com/1189108/ . I agree with you this shouldn't
ever be a problem, but it is on occasion, and the init script didn't
perform as expected (making sure the processes are actually dead before say
'OK' on the stop line). Also, there has never been an ability to run smbd
and samba at the same time unless samba spawned it (otherwise samba just
fails to run right if smbd is running first), and I am always within a few
days of the current git as I am constantly testing things for the project.
As for the PID causing samba to not start that I was referring to, I think
it must have been this commit
I do recall something that Jeremy Allison patched (I think) so this
not be the one I am thinking of, but either way that issue has been

Here is a backtrace of the smbd process that had died, but failed to
terminate.. http://paste.ubuntu.com/1189108/


On Tue, Sep 4, 2012 at 1:19 AM, Marc Muehlfeld <
Marc.Muehlfeld at medizinische-genetik.de> wrote:

> Hello Ricky,
> Am 03.09.2012 23:23, schrieb Ricky Nance:
>  What happens if smbd decides to stick when you are running s3fs? I don't
>> think your init script accounts for such a failure.
> What do you mean by 'stick'? If processes are hanging, you can restart the
> services with the script.
> smbd is started by the samba process. I don't know if it's a good idea to
> kill just the smbd process and start it by hand, because:
> - 'smbd' is a child process of 'samba'. I guess if you start it separate,
> 'samba' could have problems if it's not a child process. At least here, if
> I kill all smbd processes and start /usr/local/samba/sbin/smbd --configfile
> /usr/local/samba/private/smbd.**tmp/fileserver.conf --foreground by hand,
> I can't access any share on this server.
> - if you start 'samba', then it creates a .../private/smbd.tmp/**fileserver.conf
> on startup. If it's not started by 'samba', then you propably use an
> outdated fileserver.conf
>  I also think that the script should remove /usr/local/samba/var/samba.pid
> > (and smbd?) if samba fails to shutdown properly.
> I think it's not neccessary. I hard reset my test DC (so the PID files
> haven't been removed for sure). After the system was up again, I had
> running samba/smbd processes and two new *.pid files in var/run with the
> PIDs of new processes. The logfiles also don't have any complains and my XP
> Workstation could log on to the DC. So everything was brought up and is
> fine in that scenario.
> Samba is handling this internally and checks if there is an old PID file
> and decide to start or not (if already running).
> Regards,
> Marc
> --
> Marc Muehlfeld (IT-Leiter)
> Zentrum fuer Humangenetik und Laboratoriumsmedizin
> Dr. Klein, Dr. Rost und Kollegen
> Lochhamer Str. 29 - D-82152 Martinsried
> Telefon: +49(0)89/895578-0 - Fax: +49(0)89/895578-780
> http://www.medizinische-**genetik.de <http://www.medizinische-genetik.de>


More information about the samba-technical mailing list