I've noticed recently that Samba is creating a large number of log files on my server which meant I couldn't create any new files as it had used up my inode count.
I cleaned up a large amount of old files and I thought I had set my logs to rotate every 3 days by editing my samba entry in /etc/logrotate.d
/var/log/samba/log.smbd {
daily
missingok
rotate 3
postrotate
/etc/init.d/smbd reload > /dev/null
endscript
compress
notifempty
}
/var/log/samba/log.nmbd {
daily
missingok
rotate 3
postrotate
[ ! -f /var/run/samba/nmbd.pid ] || kill -HUP `cat /var/run/samba/nmbd.pid`
endscript
compress
notifempty
}
However this doesn't seem to have had any effect and logs are retained until it seems I delete them.
Does Samba have it's own rotation setting somewhere? Am I ok just turning this off completely?
I didn't notice this until I updated from ubuntu 14 to 16.04 - but at the same time one of my web apps has increased in popularity considerably so it could just be I'm getting more traffic.
0 Answers