Is "service smbd reload" sufficient (which does a "killproc smbd -HUP")?
Will this kill any active connections to samba resources causing user
disruption? Or is this a seamless process that can be carried out
midday?
I ask because if I need to kill all user connections to production
shares in order to test different share parameters that changes my
approach.
Thanks,
Andrew
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba
If you make changes to the [global] stanza in smb.conf you need to restart
Samba's smbd and nmbd daemons.
Changes to the share stanzas in smb.conf generally do not require a restart of
smbd. Smbd monitors the smb.conf file for changes.
Existing connections will not see the changes made, so clients that have an
existing connection should log off and logon again.
- John T.
And winbind as well? The documentation seems to indicate that winbindd
needs to be started after nmbd and smbd - so does it need to be
restarted as well, or will it remain active? Are there potential
conflicts if winbind isn't shut down before restarting the nmbd and smbd
daemons?
> Changes to the share stanzas in smb.conf generally do not require a
> restart of smbd. Smbd monitors the smb.conf file for changes.
Could you elaborate on "generally" and give me an estimate of how long
it takes for the changes to be reloaded?
Thanks a bunch for your answers,
Andrew
Yes, winbindd and smbd should be restarted after changing the global stanza of
smb.conf. In reality, this is only necessary when global parameters have
been changed that may impact Samba's behavior. For example, changing
the "log level" parameter does not require restarting of any Samba daemon.
Check the man page for smb.conf to determine if a restart is perhaps
necessary.
> > Changes to the share stanzas in smb.conf generally do not require a
> > restart of smbd. Smbd monitors the smb.conf file for changes.
>
> Could you elaborate on "generally" and give me an estimate of how long
> it takes for the changes to be reloaded?
That depends on the OS. On some older systems this can take 20 sec or so, on
all modern systems the change is almost immediately effective.
- John T.
> Thanks a bunch for your answers,
> Andrew
>
> > Existing connections will not see the changes made, so clients that
>
> have
>
> > an
> > existing connection should log off and logon again.
> >
> > - John T.
--
John H Terpstra
"Don't do as I do; Show me better!" - Anonymous.
smbcontrol smbd reload-config
no ?
Jon
2008/8/29 Andrew Masterson <Andrew.M...@nuvistaenergy.com>:
1) _webmin_ gives:
"Click this button to restart the running Samba servers on your system.
This will force the current configuration to be applied. This will also
disconnect any connections to the server, so if you do not want the
current configuration to be applied immediately you should just wait 1
minute until Samba reloads the configuration automatically."
This implies that the configuration is applied automatically after 1
minute - with no disconnects necessary. Webmin is of questionable
utility, however, given that most smb options are not configurable.
Furthermore, using the "restart" option only restarts smbd.
[root@solar ~]# ps -ae | grep win
[root@solar ~]# ps -ae | grep mbd
8530 ? 00:00:00 smbd
8537 ? 00:00:00 smbd
[root@solar ~]#
And I have to manually restart the nmbd and winbindd daemons
[root@solar ~]# ps -ae | grep mbd
8530 ? 00:00:00 smbd
8537 ? 00:00:00 smbd
8553 ? 00:00:00 nmbd
[root@solar ~]# ps -ae | grep win
8555 ? 00:00:00 winbindd
8556 ? 00:00:00 winbindd
[root@solar ~]# service smb stop
Shutting down SMB services: [ OK ]
Shutting down NMB services: [ OK ]
Shutting down Winbind services: [ OK ]
[root@solar ~]# service smb start
Starting NMB services: [ OK ]
Starting SMB services: [ OK ]
Starting Winbind services: [ OK ]
[root@solar ~]# ps -ae | grep win
[root@solar ~]# ps -ae | grep mbd
8627 ? 00:00:00 smbd
8633 ? 00:00:00 smbd
So start failed to load all the daemons (even though it claims it did)
and you have to manually restart them. This is true whether you use
webmin or a command line "service smb stop/restart"
[root@solar ~]# service smb stop
Shutting down SMB services: [ OK ]
Shutting down NMB services: [FAILED]
Shutting down Winbind services: [FAILED]
[root@solar ~]# nmbd
[root@solar ~]# smbd
[root@solar ~]# winbindd
[root@solar ~]# ps -ae | grep mbd
8666 ? 00:00:00 nmbd
8668 ? 00:00:00 smbd
8670 ? 00:00:00 smbd
[root@solar ~]# ps -ae | grep win
8672 ? 00:00:00 winbindd
8673 ? 00:00:00 winbindd
This is probably an init.d/smb issue, but either version of the daemon
initialisation gives the same result. Stop works, start claims to work
but does not. This was all out of the box or copied from how-to/by
example.
start() {
KIND="NMB"
echo -n $"Starting $KIND services: "
daemon nmbd -D
# daemon nmbd $NMBDOPTIONS
RETVAL=$?
echo
KIND="SMB"
echo -n $"Starting $KIND services: "
daemon smbd -D
# daemon smbd $SMBDOPTIONS
RETVAL2=$?
echo
KIND="Winbind"
echo -n $"Starting $KIND services: "
daemon winbindd
# daemon winbindd $WINBINDDOPTIONS
RETVAL3=$?
echo
[ $RETVAL -eq 0 -a $RETVAL2 -eq 0 -a $RETVAL3 -eq 0 ] && \
touch /var/lock/subsys/smb || RETVAL=1
return $RETVAL
}
_man smb.conf_ doesn't have any specific information, that I can find,
about when (or how) to restart samba, or that shares are auto-reloaded,
or that global config changes "generally" require a restart. Does
restarting cause users to be disconnected? What if they are in the
middle of using something on a share? Is there the potential for data
corruption? I prefer to be safe but I thought I would ask the experts
to find out.
_samba HOW-TO_
Is fairly clear that you need nmbd first, then smbd, then winbindd. It
doesn't, as far as I can find, tell you when you *need* to restart samba
(or even that you ever need to).
Nor does it contain the information that you passed on that shares are
automatically reloaded but not global configs. I may have missed it,
but I couldn't find any info on when and how in the how-to. You guys
have done a good job with the HOW-TO, but I needed some supplemental
info.
Sysinfo:
RHEL 5.2.0.4
Webmin 1.370-1
Samba 3.0.31-35
> How "hard" does information need to be to be useful?
I just need to know that if I'm pissing around with the config on one of
the test shares on a production server in the middle of the day that I
don't have to disrupt hundreds of users and risk data corruption to see
if my config is correct or not. I don't want to have to plan outages of
production shares unless I have to.
So I am asking what I *can* change without having to disrupt everyone.
I'm just a regular schmuck who wants to use Linux/Samba in a
predominantly Windows world.
-=Andrew
>
> - John T.
John H Terpstra wrote:
> On Friday 29 August 2008 09:30:05 Andrew Masterson wrote:
>> If I understand correctly, in order to have the smb.conf file applied
>> you need to restart smbd.
>>
>> Is "service smbd reload" sufficient (which does a "killproc smbd -HUP")?
>> Will this kill any active connections to samba resources causing user
>> disruption? Or is this a seamless process that can be carried out
>> midday?
>>
>> I ask because if I need to kill all user connections to production
>> shares in order to test different share parameters that changes my
>> approach.
>
> If you make changes to the [global] stanza in smb.conf you need to restart
> Samba's smbd and nmbd daemons.
I know you wrote a lot of the book on Samba, so I suspect you know what
you're talking about, but it seems like I've often made changes to Samba
having just done a kill -1 on the primary smbd process and things worked
out just fine. Maybe there is a gray area here?
> Changes to the share stanzas in smb.conf generally do not require a restart of
> smbd. Smbd monitors the smb.conf file for changes.
>
> Existing connections will not see the changes made, so clients that have an
> existing connection should log off and logon again.
- --
---- _ _ _ _ ___ _ _ _
|Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Systems Programmer II
|$&| |__| | | |__/ | \| _| |novo...@umdnj.edu - 973/972.0922 (2-0922)
\__/ Univ. of Med. and Dent.|IST/AST - NJMS Medical Science Bldg - C630
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIvKGjmb+gadEcsb4RAjQnAKCAKHRwoiq2/0aFRsYx8bjbzmnRxwCgrxbG
3o0h7mdbrTrXGSapn45ssZg=
=2nKD
-----END PGP SIGNATURE-----