[Gluster-users] How to rotate logs on glusterfs 3.1.0

Craig Carl craig at gluster.com
Wed Nov 3 10:22:35 UTC 2010

Phil - 
Please check this page - http://www.gluster.com/community/documentation/index.php/Gluster_3.1:_Rotating_Logs 


Craig Carl 

Gluster, Inc. 
Cell - (408) 829-9953 (California, USA) 
Gtalk - craig.carl at gmail.com 

From: "Phil Packer" <philp at layer3.co.uk> 
To: "Gluster General Discussion List" <gluster-users at gluster.org> 
Sent: Wednesday, November 3, 2010 2:22:23 AM 
Subject: [Gluster-users] How to rotate logs on glusterfs 3.1.0 

Hi, folks, 

Now the autofs issues have been sorted out (for which, thank you very much) I've finally upgraded my client's system to 3.1.0 but I now have some issues with logfiles. 

Currently running on Centos 5 and using a script in /etc/logrotate.d which used to work with gluster 2.n which no longer seems to work... 

The logfile rotate script I've been using looks like this: 

[l3admin at oy-imageserver2 glusterfs]$ cat /etc/logrotate.d/glusterfs 
/var/log/glusterfs/*.log /var/log/glusterfs/bricks/*.log { 
/usr/bin/killall -HUP glusterfsd || true 

And currently the log files we have are: 

[l3admin at oy-imageserver2 ~]$ cd /var/log/glusterfs/ 
[l3admin at oy-imageserver2 glusterfs]$ ls -lt | head 
total 704144 
-rw-r--r-- 1 root root 208508659 Nov 3 09:08 nfs.log.1 
-rw-r--r-- 1 root root 8941 Nov 3 08:29 mnt-auto-shared.log 
-rw-r--r-- 1 root root 2927576 Nov 3 05:09 mnt-auto-shared.log.1 
-rw-r--r-- 1 root root 0 Nov 3 04:02 etc-glusterfs-glusterd.vol.log 
-rw-r--r-- 1 root root 0 Nov 3 04:02 nfs.log 
-rw-r--r-- 1 root root 21715 Nov 2 08:20 etc-glusterfs-glusterd.vol.log.7 
-rw-r--r-- 1 root root 0 Nov 2 04:02 etc-glusterfs-glusterd.vol.log.1 
-rw-r--r-- 1 root root 629632 Nov 2 04:02 mnt-auto-shared.log.2 
-rw-r--r-- 1 root root 146007238 Nov 2 04:02 nfs.log.2 

And as you can see the nfs log has been rotated but one of the processes is still writing to the old file... 

Also in the bricks subdirectory, the log file isn't getting rotated at all. 

Does anyone have a working logrotate script for RHEL/Centos?? 

Regards to all 


Director, Layer3 Systems Ltd 
Layer3 Systems Limited is registered in England. Company no 3130393 
43 Pendle Road, Streatham, London, SW16 6RT 
tel: 020 8769 4484 
web: www.layer3.co.uk 

Gluster-users mailing list 
Gluster-users at gluster.org 

More information about the Gluster-users mailing list