rotate nfs.log

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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



[Index of Archives]     [Gluster Development]     [Linux Filesytems Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux