IBM Support

How to Fix Corruption in MariaDB Database

How To


Summary

The MariaDB database is down due to power outage, this cause collect status is down. How to fix this corruption.

Environment

Under normal usage scenarios, RTM can put very high load on the MariaDB database. In some circumstances(i.e. disk full, power outage) one or more tables can get corrupt. If this happens, you will see some or all of these symptoms:
  • Collect Status is Down or Jobs Down
  • SQL errors in the Cacti log
  • Run-in/Abended errors in the Cacti log
  • MariaDB server is down and cannot restart

Steps

You can troubleshoot database corruption issues with RTM like this:

Restart MariaDB

You should always start by checking the MariaDB server log, typically /var/log/mariadb/mariadb.log and restarting the service:
systemctl stop mariadb.service
systemctl start mariadb.service

If you are unable to stop Mariadb like this, try executing following to kill all instances of MariaDB:
#mysqladmin shutdown
#killall mariadb

ANALYZE AND REPAIR DATABASE

RTM includes useful utility called analyze_database.php which you should use to determine which tables are corrupt:
#cd /opt/IBM/cacti/cli
#php -q analyze_database.php

Most tables should return status "Successful". Tables which return with "Failed are corrupt" and should be repaired with repair_database.php
#cd /opt/IBM/cacti/cli
#php -q repair_database.php

Document Location

Worldwide


[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSZT2D","label":"IBM Spectrum LSF RTM"},"Component":"","Platform":[{"code":"PF016","label":"Linux"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

More support for:
IBM Spectrum LSF RTM

Software version:
All Versions

Operating system(s):
Linux

Document number:
880495

Modified date:
10 April 2019

UID

ibm10880495

Manage My Notification Subscriptions