Red Hat Bugzilla – Bug 1009726
Samba vfs plug-in log file in /var/log/samba/<logfile> getting overwritten after it reaches to maximum size
Last modified: 2015-05-13 12:26:54 EDT
Description of problem:
Samba vfs plug-in log file in /var/log/samba/glusterfs-<volname>.log getting overwritten after it reaches to certain size (may be 100MB) where it should have been archived.
Version-Release number of selected component (if applicable):
rpm -qa | grep 'glusterfs\|samba'
Steps to Reproduce:
As mentioned the log file is getting overwritten and the older logs are lost. The size of the log file becomes 0KB and again grows as the logging happens.
We should be renaming the old log file to .old or something if it reaches to limit of maximum size
The logrotate policy ("max log size") specified in smb.conf applies to the log files: log.<client addr>, log.smbd
/var/log/samba/glusterfs-<volname>.log is not affected by the "max log size" entry in smb.conf and gluster also doesn't have any logrotate policy for /var/log/samba/glusterfs-<volname>.log.
But apart from "max log size" configuration, samba by default has a weekly logrotate policy, where all the files in /var/log/samba/* are rotated(moved) to /var/log/samba/old/*.
In this case, it could be that /var/log/samba/glusterfs-<volname>.log was moved to /var/log/samba/old/* as a part of samba weekly logrotate, and hence a 0 sized /var/log/samba/glusterfs-<volname>.log was created.
Agree with Poornima's findings, hence closing the bug as not a defect.