Logrotate type of behavior

You can use logrotate for the storage node logs as well. Here is my config /etc/logrotate.d/storagenode

/home/storagenode/storagenode1.log
/home/storagenode/storagenode2.log
/home/storagenode/storagenode3.log
/home/storagenode/storagenode4.log
{
        weekly
        missingok
        rotate 4
        copytruncate
        nocompress
        notifempty
        create 640 storagenode storagenode
        errors <my email address>
}

This config will truncate the existing logfile. The storage node will keep writing to the logfile. I am not compressing my log files at the moment. If you want to safe some space you should do that.

3 Likes