I have 3 AWS EC2 machines, using each 500G of EBS storage.
On them I have SolrCloud search engine running on Jetty, and serving lots of queries.
In time the jetty logs have grwn hugely, up to ~200G in size.
I would like to remove that, but without giving up availability of my solr system.
If i do rm -rf logfile
then CPU wait goes up to 99% and the nodes on that machines are not responding anymore, until the load decreases.
Is there a way to remove those log files without this huge load increase? Thanks
Later Edit: So, i've found online 4 ways of emptying big files, but there is no comparation between, so i'm not sure which satisfies my problem. Pros and cons for each of them?
1.> largefile.txt
2. truncate -s 0 {filename.txt}
3. logrotate
4. cat /dev/null > largefile.txt