Skip to content

Commit f3426e3

Browse files
andriymoroz-mlnxjleveque
authored andcommitted
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 <[email protected]>
1 parent 3ed4513 commit f3426e3

File tree

1 file changed

+2
-2
lines changed
  • files/image_config/logrotate/logrotate.d

1 file changed

+2
-2
lines changed

files/image_config/logrotate/logrotate.d/rsyslog

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757

5858
VAR_LOG_SIZE_KB=$(df -k /var/log | sed -n 2p | awk '{ print $2 }')
5959

60-
# Limit usable space to 95% of the partition minus the reserved space for other logs
61-
USABLE_SPACE_KB=$(( (VAR_LOG_SIZE_KB * 95 / 100) - RESERVED_SPACE_KB))
60+
# Limit usable space to 90% of the partition minus the reserved space for other logs
61+
USABLE_SPACE_KB=$(( (VAR_LOG_SIZE_KB * 90 / 100) - RESERVED_SPACE_KB))
6262

6363
# Set our threshold so as to maintain enough space to write all logs from empty to full
6464
# Most likely, some logs will have non-zero size when this is called, so this errs on the side

0 commit comments

Comments
 (0)