Re: tmpfs
Boris via leaf-user <[email protected]> Thu, 21 Nov 2024 23:13:30 +0100
| Newsgroups | gmane.linux.leaf.user |
|---|---|
| Message-ID | <[email protected]> |
Am 20.11.24 um 23:04 schrieb Erich Titl: > Hi Boris > > Am 20.11.2024 um 22:03 schrieb Boris: >> Hej Erich, >> > ... > >>> >>> I doubt this, in my case to clear the space a correct restart of the >>> service was needed. >> >> At the risk of revealing my complete cluelessness: Which service >> (daemon) are you restarting correctly?? > > There are obviously several daemons that are involved in logging and > even some applications which do their own logging > > lighttpd:DAEMON=lighttpd > ntp:DAEMON=rsyslog > shorewall:DAEMON=ulogd > syslog:DAEMON=rsyslog > ulogd:DAEMON=ulogd > > So if you remove and compress a logfile the file descriptor of that file > will be invalid in the logging application, be it an application like > lighttpd or a network process as configured by shorewall. > > So there is probably a flaw in the logrotation script, as it restarts > the logging process only after the fact. It should probably first stop > the logging process, then compress the affected file and only then > restart the logging completely. In the past this appears to not have had > much of an impact but maybe big logfiles which require more space and > resources to compress change this. > > Basically logrotate does the following > > For each logfile in the configuration it determines if it needs to be > compressed, then calls savelog to compress and rotate that file and then > typically restarts the logging process. > > I have not looked in depth into savelog believeing they do everything > right, but here is something from the savelog script. > > # Bugs: If a process is still writing to the file.0 and savelog > # moved it to file.1 and compresses it, data could be lost. > # Smail does not have this problem in general because it > # restats files often. Hej Erich, sure you read the statement from Andrew and my following answer. Think we prooved the cause that you found in the savelog script in the same time. I found POSTROTATE_EXEC in /usr/bin/logratate that perhaps might be used for restarting the causing dameons. I think that could easy be done for the two dameons in my case, but it could be hard to integrate for possible other loaded pakets. Also I wonder my boxes seem to be the only affected? Regards, Boris ------------------------------------------------------------------------ leaf-user mailing list: [email protected] https://lists.sourceforge.net/lists/listinfo/leaf-user Support Request -- http://leaf-project.org/