While troubleshooting a disk space issue on a proxysql node I noticed the following:
sudo lsof +L1 | grep -E "COMMAND|proxysql"
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NLINK NODE NAME
proxysql 5403 proxysql 2w REG 253,3 1212984784 0 2424 /var/lib/proxysql/proxysql.log-20171101 (deleted)
Which means that deleted files are kept open by the process and the diskspace is still claimed.
/etc/logrotate.d/proxysql-logrotate looks like this:
/var/lib/proxysql/*.log {
missingok
daily
notifempty
compress
create 0600 proxysql proxysql
rotate 5
}
It should probably include something like the following:
/var/lib/proxysql/*.log {
missingok
daily
notifempty
compress
create 0600 proxysql proxysql
rotate 5
sharedscripts
postrotate
/etc/init.d/proxysql reload >/dev/null 2>&1 || true
endscript
}
I will test this monday.