[Gluster-users] rotate nfs.log

Greg_Swift at aotx.uscourts.gov Greg_Swift at aotx.uscourts.gov
Tue Oct 11 20:47:44 UTC 2011



gluster-users-bounces at gluster.org wrote on 10/11/2011 01:54:29 PM:

> anyone know how to rotate the nfs.log? mine's about 5 G already..

the manual process:

mv /var/log/glusterfs/nfs.log /var/log/glusterfs/nfs.log.1
killall -HUP glusterfs

There is a sample logrotate.d config file in the upstream, but I don't like
their examples (unmodified use of them will adjust your entire logrotate
configuration, not just gluster's).

Here is what my logrotate file looks like (doesn't handle geo-rep logs):

# Rotate brick logs
/var/log/glusterfs/bricks/*.log {
  weekly
  rotate 52
  missingok
  compress
  delaycompress
  notifempty
  sharedscripts
  postrotate
  /usr/bin/killall -HUP glusterfsd > /dev/null 2>&1 || true
  endscript
}

# Rotate remaining logs
/var/log/glusterfs/*.log {
  weekly
  rotate 52
  missingok
  compress
  delaycompress
  notifempty
  sharedscripts
  postrotate
  /usr/bin/killall -HUP glusterfs > /dev/null 2>&1 || true
  /usr/bin/killall -HUP glusterd > /dev/null 2>&1 || true
  endscript
}



-greg




More information about the Gluster-users mailing list