Simple GlusterFS log rotation

Simple GlusterFS log rotation

Category : How-to

Get Social!


You’ll be glad to know that GlusterFS has built in log rotation! This means that you can use a simple gluster command to rotate the log for a specific volume. This is very helpful when troubleshooting where it can be easiest to truncate logs before regenerating the issue.

For enduring log rotation I recommend using logrotate which I will cover in a future blog post.

Logs are rotated per volume, so you will need to know the volume name before issuing the command to rotate the log. Use the below command to list all the volumes available on your server:

Use the gluster command, replacing [VOL_NAME] with the volume name of the log file you would like to rotate.

In the below example, the logs for volume datastore will be rotated.

Below is the result on the file system displayed with the ls command.

And that’s it! Your log file will be moved and have a time stamp appended, and a new log will be started for the volume.

See my other post on using logrotate for more advanced log rotation.

Visit our advertisers


Quick Poll

Which type of virtualisation do you use?
  • Add your answer

Visit our advertisers