Found that the disk utilization for one of our database servers was 83%. Checking with df -h and du -sh, found that the directory with most data usage was
/bitnami/mysql/data$ sudo du -sh *
192K #ib_16384_0.dblwr
8.2M #ib_16384_1.dblwr
676K #innodb_temp
4.0K auto.cnf
1.1G binlog.000867
1.1G binlog.000868
1.1G binlog.000869
1.1G binlog.000870
1.1G binlog.000871
1.1G binlog.000872
1.1G binlog.000873
1000M binlog.000874
1.1G binlog.000875
So, these binary logs were taking up all the space, when the actual database itself was only less than a GB. Followed this to disable binary logging - How to Disable Binary Logging in MySQL on Bitnami servers? (supportsages.com)
sudo /opt/bitnami/ctlscript.sh stop mysql
sudo nano /opt/bitnami/mysql/conf/my.conf
and added the disable line after
[mysqld]
disable_log_bin
sudo /opt/bitnami/ctlscript.sh start mysql
Waited for some days, but the bin logs were not getting auto deleted. So, manually deleted them and did a restart of mysql with
sudo /opt/bitnami/ctlscript.sh restart
Now the disk is only 30% used.
No comments:
Post a Comment