logrotate часто записываемый в журнал без потери данных

Я сообщил об этом в RedHat. На самом деле это было вызвано ошибкой в ​​ядре RedHat и было исправлено в ядре -3.10.0 -693.18.1.el7. По крайней мере для NFSv3. Для NFSv4 это кажется желаемым поведением.

Если у вас есть подписка RedHat, вы можете найти билет:Билет 01951116

0
26.02.2020, 20:04
1 ответ

Похоже, что функция copytruncateможет выполнить это:

copytruncate Truncate the original log file in place after creating a copy, instead of moving the old log file and optionally creating a new one. It can be used when some program cannot be told to close its logfile and thus might continue writing (appending) to the previous log file forever. Note that there is a very small time slice between copying the file and truncating it, so some logging data might be lost. When this option is used, the create option will have no effect, as the old log file stays in place.

Я поставил это на место.

0
28.04.2021, 23:22

Теги

Похожие вопросы