Bug 11288 - Samaba does not perform log rotation correctly
Samaba does not perform log rotation correctly
Status: RESOLVED DUPLICATE of bug 11100
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other
4.1.17
All All
: P5 normal
: ---
Assigned To: Andrew Bartlett
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-05-25 09:18 UTC by Javier Bahillo
Modified: 2015-05-25 09:38 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Javier Bahillo 2015-05-25 09:18:51 UTC
When defined a max log size for samba:
max log size = 100000

it looks that samba process keep file descriptors open for samba.log.old even if that file has been deleted:

samba 14779 root 2w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14779 root 3w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14783 root 2w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14783 root 3w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14784 root 2w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14784 root 3w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
smbd 14787 root 3w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
smbd 14787 root 31r REG 252,6 6806312 527819 /var/lib/sss/mc/passwd (deleted)
samba 14788 root 2w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14788 root 3w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14789 root 2w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14789 root 3w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14790 root 2w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14790 root 3w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14791 root 2w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14791 root 3w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14792 root 2w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14792 root 3w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14793 root 2w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14793 root 3w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14794 root 2w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14794 root 3w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14795 root 2w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14795 root 3w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14796 root 2w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14796 root 3w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14799 root 2w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)
samba 14799 root 3w REG 252,6 19726843337 1309733 /var/log/samba/samba.log.old (deleted)

In worst cases, this might led to usual tools like df to report filesystem  being full, while it is actually not (just because of file descriptors being opened - restarting samba will close those descriptors and workaround the issue)
Comment 1 Andrew Bartlett 2015-05-25 09:38:02 UTC

*** This bug has been marked as a duplicate of bug 11100 ***