logrotate: utilize the new 'maxsize' option

Since logrotate 3.8.x version, a new option 'maxsize' is supported,
which helps in rotating the logs before the specified time if the
size exceeds maxsize limit. This should help in reducing the
overflow of gluster logs.

Updates: bz#1193929
Change-Id: Id33c34d72f1931e7996893de9338db667e1e900d
Signed-off-by: Amar Tumballi <amarts@redhat.com>
This commit is contained in:
Amar Tumballi 2018-09-17 11:57:22 +05:30
parent 86f1aa94c1
commit a7a7d3bd1c
3 changed files with 35 additions and 5 deletions

View File

@ -32,6 +32,8 @@ extras/cliutils/README.md
extras/command-completion/README
extras/create_new_xlator/README.md
extras/glusterfs.vim
extras/glusterfs-logrotate
extras/glusterfs-georep-logrotate
extras/init.d/glusterd-Debian.in
extras/init.d/glusterd-FreeBSD.in
extras/init.d/glusterd-Redhat.in

View File

@ -1,6 +1,12 @@
/var/log/glusterfs/geo-replication/*/*.log {
sharedscripts
rotate 52
weekly
maxsize 10M
minsize 100k
# 6 months of logs are good enough
rotate 26
missingok
compress
delaycompress
@ -15,7 +21,13 @@
/var/log/glusterfs/geo-replication-slaves/*.log {
sharedscripts
rotate 52
weekly
maxsize 10M
minsize 100k
# 6 months of logs are good enough
rotate 26
missingok
compress
delaycompress
@ -30,7 +42,13 @@
/var/log/glusterfs/geo-replication-slaves/*/*.log {
sharedscripts
rotate 52
weekly
maxsize 10M
minsize 100k
# 6 months of logs are good enough
rotate 26
missingok
compress
delaycompress

View File

@ -2,7 +2,12 @@
/var/log/glusterfs/*.log {
sharedscripts
weekly
rotate 52
maxsize 10M
minsize 100k
# 6 months of logs are good enough
rotate 26
missingok
compress
delaycompress
@ -17,7 +22,12 @@
/var/log/glusterfs/bricks/*.log {
sharedscripts
weekly
rotate 52
maxsize 10M
minsize 100k
# 6 months of logs are good enough
rotate 26
missingok
compress
delaycompress