2.0.4b: logrotate problems with rh60

Stephen L Arnold arnold.steve at ensco.com
Mon Jul 12 15:54:49 GMT 1999


When the world was young,  giulioo at tiscalinet.it (Giulio Orsero) 
carved some runes like this:  

> On Sun, 11 Jul 1999 09:47:59 +1000, hai scritto:
> 
> >> It seems that once the log file is rotated smbd keeps logging to the
> >> old renamed/rotated file. Is "killall -HUP smbd" (since it is used as
> >> the postrotate script) supposed to tell smbd to reopen the log file?
> >[snip]
> >
> >I'm not sure; maybe you should try "/etc/rc.d/init.d/smb restart" 
> >instead.  It's worth a try.
> 
> Yes, this certainly works, and this is what I've used so far; but I hoped
> that there was a solutions similar to that of all other daemons, which can
> be signalled to reopen the logs.
> 
> Moreover the restart has some drawbacks:
> 1) If logrotate runs while there are open files, does samba shutdown and
> restart, may this cause locking inconsistencies or errors in file
> transfers? 2) The "smb restart" (with the standard /etc/rc.d/init.d/smb) 
> restarts both smbd and nmbd twice (once for the rotation of log.nmb and
> once for log.smb), not elegant :-)

Logrotate runs as one of the cron.daily jobs (check logrotate.conf, 
/etc/logrotate.d, crontab).  I think it runs in the wee hours of 
the morning (but you can change it to anything you want).

I'm not sure what the deal is with samba 2.0.x; my 1.9.18 setup 
works fine with the HUP signal and logrotate.  Maybe you should try 
2.0.4b (or the latest snapshot).  Isn't bleeding on the edge fun?

As far as open files and samba restarts, feel free to test it (and 
let us know what happens).

HTH, Steve

******************************************************************
Stephen L Arnold                      http://www.rain.org/~sarnold
#include <std_disclaimer.h>
******************************************************************


More information about the samba mailing list