icinga2 – disk space is full – /var/lib/mysql/mysql-bin

Under /var/lib/mysql the mysql-bin.000025* files have eaten all of my disk space

icinga2-disk-space-full-mysql

Solution

The mysql-bin files are some kind of backup of database changes.

You can set that you will have those files for three days.

Then the logs don’t eat all of your disk space.

mysql -u root -p

PURGE BINARY LOGS TO 'mysql-bin.000020';

exit
Set this in /etc/mysql/my.cnf under the [mysqld] section:

expire_logs_days=3
systemctl restart mysqld

Now all of the older files disappear and you don’t have 100% disk space blocked.

Kommentar verfassen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

Scroll to Top