On 3 Nov 2010, Phil Packer had asked about rotating log files. While brick log files get rotated via the "gluster volume log rotate" command, the question was left unanswered for logs like: /var/log/glusterfs/nfs.log /var/log/glusterfs/VOLUME.log Is there any update on how we're supposed to rotate these files that's more friendly than shutting down glusterd, rotating them, and starting up glusterd again? Glusterfs is chatty in its logs, and I'd prefer not to have those files grow very big. Finally, as far as the brick logs go, is the intent that after they are rotated we can just run a find(1) for old ones and delete them as required? Devin
----- Original Message -----> On 3 Nov 2010, Phil Packer had asked about rotating log files. > While brick log files get rotated via the "gluster volume log rotate" > command, the question was left unanswered for logs like: > > /var/log/glusterfs/nfs.log > /var/log/glusterfs/VOLUME.log > > Is there any update on how we're supposed to rotate these files > that's more friendly than shutting down glusterd, rotating them, > and starting up glusterd again? > > Glusterfs is chatty in its logs, and I'd prefer not to have > those files grow very big. > > Finally, as far as the brick logs go, is the intent that after they > are rotated we can just run a find(1) for old ones and delete them > as required? > > Devin > > _______________________________________________ > Gluster-users mailing list > Gluster-users at gluster.org > http://gluster.org/cgi-bin/mailman/listinfo/gluster-usersdo 'man logrotate' and look for "copytruncate" -- ?rjan Ommundsen Redpill Linpro AS - Changing the game Kontor: +47 21 54 41 69
Hi Devin, Answers inline. On Sat, Dec 11, 2010 at 11:02 AM, Devin Reade <gdr at gno.org> wrote:> On 3 Nov 2010, Phil Packer had asked about rotating log files. > While brick log files get rotated via the "gluster volume log rotate" > command, the question was left unanswered for logs like: > > /var/log/glusterfs/nfs.log > /var/log/glusterfs/VOLUME.log > > Is there any update on how we're supposed to rotate these files > that's more friendly than shutting down glusterd, rotating them, > and starting up glusterd again? > >You can do below steps to get the log rotate done for these volumes: step 1: get the pid of process for which you want to rotate the log ( hint: " ps aux| grep <$logfile>" ) step 2: mv $logfile ${logfile}.1 (or any name of choice) step 3: kill -HUP $pid_of_glusterfs_process step 4: done :-)> Finally, as far as the brick logs go, is the intent that after they > are rotated we can just run a find(1) for old ones and delete them > as required? > >If you are covered under support, please check with Gluster Support before deleting the files. Or, If the logs are old, and during that period you haven't faced any issues with GlusterFS, you can delete them. Regards, Amar