I was alerted to low diskspace on my Centreon 24.10 server and the space was mostly being used by the database. On further investigation I saw that the partitioning had stopped 23/11/2024 with the pmax being the largest.
Partitioning Properties | ||||||||||||||||||||||||||||||
|
When I try to run “/usr/bin/php /usr/share/centreon/cron/centreon-partitioning.php” I receive:
>root@LINFPV003 a-fv]# su - centreon -c '/usr/bin/php /usr/share/centreon/cron/centreon-partitioning.php'
'Mon, 31 Mar 25 08:19:44 +0200] PARTITIONING STARTED
PHP Warning: file_put_contents(/var/log/centreon/sql-error.log): Failed to open stream: Permission denied in /usr/share/centreon/www/class/centreonLog.class.php on line 243
3Mon, 31 Mar 25 08:20:05 +0200] Error: cannot add a new partition 'p20241124' for table `centreon_storage`.data_bin, SQLSTATEQHY000]: General error: 2006 MySQL server has gone away
If I run the same command as root I then get
>root@LINFPV003 a-f]# /usr/bin/php /usr/share/centreon/cron/centreon-partitioning.php
pMon, 31 Mar 25 08:39:15 +0200] PARTITIONING STARTED
DMon, 31 Mar 25 08:39:38 +0200] Error: cannot add a new partition 'p20241124' for table `centreon_storage`.data_bin, SQLSTATEQHY000]: General error: 2006 MySQL server has gone away
Seems that the MariaDB service crashes out then automatically restarts and recovers.
Mar 31 08:20:11 LINFPV003 mariadbda4108242]: 2025-03-31 8:20:11 0 0Note] Plugin 'FEEDBACK' is disabled.
Mar 31 08:20:11 LINFPV003 mariadbda4108242]: 2025-03-31 8:20:11 0 0Note] InnoDB: Rolled back recovered transaction 55220459
Mar 31 08:20:11 LINFPV003 mariadbda4108242]: 2025-03-31 8:20:11 0 0Note] InnoDB: Rollback of non-prepared transactions completed
Mar 31 08:20:11 LINFPV003 mariadbda4108242]: 2025-03-31 8:20:11 0 0Note] DDL_LOG: Crash recovery executed 1 entries
Mar 31 08:20:11 LINFPV003 mariadbda4108242]: 2025-03-31 8:20:11 0 0Note] Server socket created on IP: '0.0.0.0'.
Mar 31 08:20:11 LINFPV003 mariadbda4108242]: 2025-03-31 8:20:11 0 0Note] Server socket created on IP: '::'.
Mar 31 08:20:11 LINFPV003 mariadbda4108242]: 2025-03-31 8:20:11 0 0Note] InnoDB: Buffer pool(s) load completed at 250331 8:20:11
Mar 31 08:20:11 LINFPV003 mariadbda4108242]: 2025-03-31 8:20:11 0 0Note] /usr/sbin/mariadbd: ready for connections.
Any ideas how I can fix the database to get this working again? If the issue is diskspace then I can add more (16GB is free), but I haven’t needed to in the 3 years I’ve been running this server, but I will do so if it’s the only option.