The CA Spectrum Report Manager was configured to retain 45 days of historical data from the partitioned event table, but the MySQL InnoDB is not releasing disk space after deleting data rows from the table.
How to reclaim unused space on InnoDB partitioned reporting.event table?
Release: Any
Component: Spectrum Report Manager
NOTE: Starting from DX NetOps Spectrum 21.2.4, the default root password for MySql is "MySqlR00t". For DX NetOps Spectrum versions prior to 21.2.4, the default root password is "root". In the following MySql commands, replace <PASSWD> with the root password for your DX NetOps Spectrum version.
Out Of the Box (OOB) CA Spectrum Report Manager (SRM) will not shrink the reporting database.
Running ALTER TABLE tbl_name ENGINE=INNODB on an existing InnoDB table performs a “null” ALTER TABLE operation, which can be used to defragment an InnoDB table.
1 - Log into the SRM system as the user that owns the Spectrum installation
2 - If on Windows, start a bash shell by running "bash -login"
3 - cd to the $SPECROOT/mysql/bin directory and enter the following command to log into mysql:
./mysql --defaults-file=../my-spectrum.cnf -uroot -p<PASSWD> reporting
4 - Run the following command at the mysql prompt:
ALTER TABLE event ENGINE=INNODB;
In the following image you can see the files before and after defragmentation:
You can also run this MySQL syntax from a script to run it in a weekly basis:
cd $SPECROOT/mysql/bin
./mysql --defaults-file=../my-spectrum.cnf -uroot -p<PASSWD> reporting -e "ALTER TABLE event ENGINE=InnoDB;"