[Gluster-users] How do I rotate **all** the Gluster logs?

Greg Scott GregScott at infrasupport.com
Fri Jul 19 22:15:13 UTC 2013


> If you are trying to see an immediate rotation, play with the "size" parameter.

Thank you - I am in your debt!   This worked:

[root at chicago-fw1 logrotate.d]# ls -al /var/log/glusterfs
total 1452
drwxr-xr-x.  5 root root   4096 Jun 28 10:48 .
drwxr-xr-x. 25 root root   4096 Jul 19 07:01 ..
drwxr-xr-x.  2 root root   4096 Jul 18 15:33 bricks
-rw-------.  1 root root  11763 Jul 19 05:54 cli.log
-rw-------.  1 root root    545 Jul 19 05:54 .cmd_log_history
-rw-------.  1 root root 146816 Jul 19 11:51 etc-glusterfs-glusterd.vol.log
-rw-------.  1 root root  10160 Jul 13 18:43 etc-glusterfs-glusterd.vol.log-20130714
-rw-------.  1 root root 714670 Jul 19 11:51 firewall-scripts.log
drwxr-xr-x.  2 root root   4096 Jul 13 18:39 geo-replication
drwxr-xr-x.  3 root root   4096 Jul 13 18:39 geo-replication-slaves
-rw-------.  1 root root 335825 Jul 19 11:49 glustershd.log
-rw-------.  1 root root 218787 Jul 19 11:49 nfs.log
[root at chicago-fw1 logrotate.d]#
[root at chicago-fw1 logrotate.d]# logrotate /etc/logrotate.d/firewall-scripts
[root at chicago-fw1 logrotate.d]#
[root at chicago-fw1 logrotate.d]# ls -al /var/log/glusterfs
total 1448
drwxr-xr-x.  5 root root   4096 Jul 19 17:12 .
drwxr-xr-x. 25 root root   4096 Jul 19 07:01 ..
drwxr-xr-x.  2 root root   4096 Jul 18 15:33 bricks
-rw-------.  1 root root  11763 Jul 19 05:54 cli.log
-rw-------.  1 root root    545 Jul 19 05:54 .cmd_log_history
-rw-------.  1 root root 146816 Jul 19 11:51 etc-glusterfs-glusterd.vol.log
-rw-------.  1 root root  10160 Jul 13 18:43 etc-glusterfs-glusterd.vol.log-20130714
-rw-------.  1 root root      0 Jul 19 17:12 firewall-scripts.log
-rw-------.  1 root root 714670 Jul 19 17:12 firewall-scripts.log.1
drwxr-xr-x.  2 root root   4096 Jul 13 18:39 geo-replication
drwxr-xr-x.  3 root root   4096 Jul 13 18:39 geo-replication-slaves
-rw-------.  1 root root 335825 Jul 19 11:49 glustershd.log
-rw-------.  1 root root 218787 Jul 19 11:49 nfs.log
[root at chicago-fw1 logrotate.d]#
[root at chicago-fw1 logrotate.d]#
[root at chicago-fw1 logrotate.d]# more firewall-scripts
/var/log/glusterfs/firewall-scripts.log {
        copytruncate
        size 100k
        rotate 5
}
[root at chicago-fw1 logrotate.d]#

- Greg




More information about the Gluster-users mailing list