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

Phil Packer philp at layer3.co.uk
Wed Nov 3 09:22:23 UTC 2010


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 {
sharedscripts
missingok
postrotate
/usr/bin/killall -HUP glusterfsd || true
endscript
}

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


Phil


-- 
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






More information about the Gluster-users mailing list