cpmdata volume disk usage growth

cpmdata volume disk usage growth due to binlog

Background:

In version 4.2.x, we have upgraded MySQL DB from version 5 to version 8, this changed the default parameter that determines how many binlog file to keep from 10 days to 30 days. This might result in increase in the size the MySQL DB take in the cpmdata volume.

To change this, follow the steps below

Solution:

  1. Take snapshot of the CPMDATA volume before making any changes.
  2. SSH into the N2WS server, user is cpmuser
  3. Edit the mysql config file with sudo rights
    for example, with VI editor: sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
    or with nano editor: sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf

  4. search for commented “binlog_expire_logs_Seconds” parameter

  5. Uncomment it and set it to 10 days. (864,000)
  6. Save the changes and exit the file
  7. Then restart mysql:
    sudo systemctl restart mysql
  8. After that make sure it’s running using the following command:
    sudo systemctl status mysql
  9. Mysql should now be set to keep 10 days of binlog files like previous versions.