Results 1 to 2 of 2
Hi,
I've inherited a few servers, and actually really never used logrotate much myself. The setup is, 2 servers are using a common datastore to serve up data. The data ...
- 11-10-2010 #1Just Joined!
- Join Date
- Aug 2005
- Posts
- 9
logrotate and nfs question
Hi,
I've inherited a few servers, and actually really never used logrotate much myself. The setup is, 2 servers are using a common datastore to serve up data. The data they are serving is static, so it's ok for them to use the same files. Each write separate logs.
For some reason the person set it up so servers 1 3 and 5 are rotating all logs for the pairs (1-2, 3-4, 5-6), whereas servers 2 4 and 6 are not running log rotate. The logs are named app.$servername.log.
The only thing I can think of is that logrotate running on server 1,3,5 is only looking at the open files that it's pids are using, which is why 2,4,6 is being left behind.
Does this sound accurate? My question is what is the best way to ensure that all logs get rotated, and that there aren't conflicts or duplicate files being rotated out (all files currently are tar gz'ed up into a subdirectory (old_logs).
I think what I need to do... but log rotate doesn't seem to support it... would be able to specify a servername in my logrotate config for this app, because each log will always have it's servername in the name.. so I'm wondering... can I do something like this...
/localdisk/application/*/logs/*server1.fully.qualified.domain* {
weekly
olddir old_logs
rotate 4
copytruncate
compress
}
I'll try the above... but curious to hear anyone elses opinions.
- 11-10-2010 #2Just Joined!
- Join Date
- Aug 2005
- Posts
- 9
using *server1* worked fine. I just forced a logrotate on my server and it's picking them up. I put rotates on the even servers and all is well in the world.
Thanks for listening


Reply With Quote