From f3426e32dcf086cd02b82acfaa3956f96395b3e0 Mon Sep 17 00:00:00 2001 From: Andriy Moroz Date: Mon, 30 Apr 2018 21:18:56 +0300 Subject: [PATCH] Decrease usable space in log partition to 90% (#1648) 95 is too close to the edge because by default 5% is already reserved for super-user Signed-off-by: Andriy Moroz --- files/image_config/logrotate/logrotate.d/rsyslog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/image_config/logrotate/logrotate.d/rsyslog b/files/image_config/logrotate/logrotate.d/rsyslog index ed54c62082..6788762d76 100644 --- a/files/image_config/logrotate/logrotate.d/rsyslog +++ b/files/image_config/logrotate/logrotate.d/rsyslog @@ -57,8 +57,8 @@ VAR_LOG_SIZE_KB=$(df -k /var/log | sed -n 2p | awk '{ print $2 }') - # Limit usable space to 95% of the partition minus the reserved space for other logs - USABLE_SPACE_KB=$(( (VAR_LOG_SIZE_KB * 95 / 100) - RESERVED_SPACE_KB)) + # Limit usable space to 90% of the partition minus the reserved space for other logs + USABLE_SPACE_KB=$(( (VAR_LOG_SIZE_KB * 90 / 100) - RESERVED_SPACE_KB)) # Set our threshold so as to maintain enough space to write all logs from empty to full # Most likely, some logs will have non-zero size when this is called, so this errs on the side