Hai,
This is on Bionic i think? That should not be a samba thing..
I had a look at my logrotate. Thats exactly the same as yours.
On my debian and ubuntu servers.
Only, i dont have these 2 in my smb.conf,> log level = 1
> max log size = 10000
Only difference as far i can tell. Not that it "should" matter.
But i seen failing logrotates also, just not in samba.
What to you see if you run :
logrotate -d /etc/logrotate.conf
Or
logrotate -d -f /etc/logrotate.conf
-d debug
-f force
Greetz,
Louis
> -----Oorspronkelijk bericht-----
> Van: samba [mailto:samba-bounces at lists.samba.org] Namens
> Viktor Trojanovic via samba
> Verzonden: woensdag 1 september 2021 11:06
> Aan: samba
> Onderwerp: [Samba] Issues with log rotation
>
> Hi,
>
> On one of my systems running Samba 4.10.18-Ubuntu (by Louis) logs in
> /var/log/samba are not being rotated which leads to the log
> folder getting
> too big and bringing down the system.
>
> I'm not sure what's going wrong here. In /etc/samba/smb.conf, I
have
>
> log level = 1
> max log size = 10000
>
> I don't have any reference to the log file as I assume that's only
> necessary when deviating from the default. Clearly, log files in
> /var/log/samba are being generated even in the absence of this entry.
>
> On my Ubuntu system, there is further a logrotate entry for Samba in
> /etc/logrotate.d/samba with the following content:
>
> /var/log/samba/log.smbd {
> weekly
> missingok
> rotate 7
> postrotate
> [ ! -x /usr/bin/smbcontrol ] || [ ! -f
> /var/run/samba/smbd.pid ] || /usr/bin/smbcontrol smbd reload-config
> endscript
> compress
> delaycompress
> notifempty
> }
>
> /var/log/samba/log.nmbd {
> weekly
> missingok
> rotate 7
> postrotate
> [ ! -x /usr/bin/smbcontrol ] || [ ! -f
> /var/run/samba/nmbd.pid ] || /usr/bin/smbcontrol nmbd reload-config
> endscript
> compress
> delaycompress
> notifempty
> }
>
> /var/log/samba/log.samba {
> weekly
> missingok
> rotate 7
> postrotate
> if [ -d /run/systemd/system ] && command systemctl
> >/dev/null 2>&1 && systemctl is-active --quiet
samba-ad-dc; then
> systemctl kill --kill-who all --signal=SIGHUP
> samba-ad-dc
> elif [ -f /var/run/samba/samba.pid ]; then
> # This only sends to main pid, See #803924
> kill -HUP `cat /var/run/samba/samba.pid`
> fi
> endscript
> compress
> delaycompress
> notifempty
> }
>
> I'm not sure how this fits together with the entries in
> smb.conf and if one
> depends on the other. But my understanding is that
> /var/log/samba/log.samba
> should be rotated weekly and that only 7 files should be kept.
>
> Anyway, clearly neither one nor the other is working as
> log.samba is just
> growing and growing and there is not a single .old file for log.samba.
>
> Any advice on how to mitigate this situation?
>
> Thanks,
> Vic
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: https://lists.samba.org/mailman/options/samba
>
>