I had a requirement to make changes to a live samba server, where there were many many open files with locks reported by smbstatus
Previously I have forced users to close files so that configuration changes can take place, or done them out of ours (yawn!)
I stumbled across this Ubuntu forum post from 2008 in which imparts their wisdom and explains how to make the changes active without dropping open file locks.
I have successfully followed the advice and reloaded the smb.conf changes with 82 locked files open!
http://ubuntuforums.org/showthread.php?t=903896
Re: samba restart without connection loss ?
Originally Posted by
dmizer
A samba server MUST be stopped and then started before any new changes to smb.conf can be made available. There is no way to keep samba active and initiate changes to smb.conf. Most server services function in this way.
This is why I mentioned failover. If you need 100% uptime, you need a backup to your server.
No, no, no. This is absolutely false. I registered on this forum to reply to this message specifically. To get samba to recognize changes to its smb.conf *without restart*, as root:
1) First test your configuration file for errors:
# testparm /path/to/smb.conf; echo $?
If it exits '0' you're good to go.
2) Find the parent SMBD
# ps -ef | grep smbd
In the list find the process parented by Init, or process 1. This is the parent smbd daemon to the other servicing children.
#) Issue that pid a SIGHUP:
kill -1 <yourPID>
Done. This is regularly performed and confirmed to work without interruption a Samba cluster hosting thousands of clients.