The Samba-Bugzilla – Bug 9673
max log size doesn't rotate all logs when using variable logfile names
Last modified: 2016-10-13 03:30:36 UTC
I use the following parameters for logging:
log file = /var/log/samba/%m.log
debug pid = yes
log level = 1
max log size = 1000
All logfiles are rotated if they get bigger than the configured size (that's how it should be):
# ls -lh 10.1.0.254.log*
-rw-r--r-- 1 root root 12K 22. Feb 16:57 10.1.0.254.log
-rw-r--r-- 1 root root 1M 21. Feb 11:43 10.1.0.254.log.old
only the %m.log, is growing without end:
# ls -lh %m.log
-rw-r--r-- 1 root root 20M 22. Feb 17:35 %m.log
My answer to Björns posting on the samba-technical mailinglist:
Am 21.03.2014 12:21, schrieb Bjoern Baumbach:
> I tried to reproduce the problem which is described in bug 9673, since
> it may be related to bug 10239. I've setup a very simple Samba v4-0-test
> server, started the nmbd and smbd and verified that the log files
> rotating as soon the max log size has been reached.
> This is my config:
> ./bin/testparm -s
> Load smb config files from /s4/logSizetest/etc/smb.conf
> Loaded services file OK.
> Server role: ROLE_STANDALONE
> log file = /s4/logSizetest/var/rotateme-please-%m.log
> max log size = 512
> Any suggestion why my setup rotates the logs and other do not?
The difference I see is, that yours is a standalone and on all machines
I have this, are DCs.
Also on DCs, the logs of the clients are rotated. But there's also one
logfile named "%m.log" (with your config, It would be called
"rotateme-please-%m.log"). This one contains output from the samba
process and not from smbd or the child-smbds forked by connecting
clients, I think. And this one isn't rotated
Problem still exists in 4.1.7.
Setting product / version of this bug report to 4.1.7.
Update: In 4.5.0rc2, the rotation for the log file named %m.log still does not work.