Server restart breaks my tables
Posted: Wed Aug 12, 2015 2:25 pm
Sorry, I posted this before but lost the post...
A shutdown -ry 0 of my 4 servers resulted in the monitoring engine not starting on 3 servers. A check shows missing tables. Actually, the tables are missing after running repairmysql.sh. Whether they we missing before I'm not sure.
Running repairmysql.sh brought back 2 of the 3, but still, one is broken.
# echo 'check table nagios_servicestatu;' | mysql -t -pnagiosxi nagios
+----------------------------+-------+----------+--------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+----------------------------+-------+----------+--------------------------------------------------+
| nagios.nagios_servicestatu | check | Error | Table 'nagios.nagios_servicestatu' doesn't exist |
| nagios.nagios_servicestatu | check | status | Operation failed |
+----------------------------+-------+----------+--------------------------------------------------+
Normally, the following fixes things.
service mysqld stop
/usr/local/nagiosxi/scripts/repairmysql.sh nagios
So most important, how should this be fixed?
Less important is why can't the system be restarted with shutdown?
[root@cocsm2mlnag001 ~]# chkconfig --list | grep -e nagios -e mysql -e postgres
mysqld 0:off 1:off 2:off 3:on 4:off 5:on 6:off
nagios 0:off 1:off 2:off 3:on 4:off 5:on 6:off
nagiosxi 0:off 1:off 2:off 3:on 4:off 5:on 6:off
postgresql 0:off 1:off 2:off 3:on 4:off 5:on 6:off
A shutdown -ry 0 of my 4 servers resulted in the monitoring engine not starting on 3 servers. A check shows missing tables. Actually, the tables are missing after running repairmysql.sh. Whether they we missing before I'm not sure.
Running repairmysql.sh brought back 2 of the 3, but still, one is broken.
# echo 'check table nagios_servicestatu;' | mysql -t -pnagiosxi nagios
+----------------------------+-------+----------+--------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+----------------------------+-------+----------+--------------------------------------------------+
| nagios.nagios_servicestatu | check | Error | Table 'nagios.nagios_servicestatu' doesn't exist |
| nagios.nagios_servicestatu | check | status | Operation failed |
+----------------------------+-------+----------+--------------------------------------------------+
Normally, the following fixes things.
service mysqld stop
/usr/local/nagiosxi/scripts/repairmysql.sh nagios
So most important, how should this be fixed?
Less important is why can't the system be restarted with shutdown?
[root@cocsm2mlnag001 ~]# chkconfig --list | grep -e nagios -e mysql -e postgres
mysqld 0:off 1:off 2:off 3:on 4:off 5:on 6:off
nagios 0:off 1:off 2:off 3:on 4:off 5:on 6:off
nagiosxi 0:off 1:off 2:off 3:on 4:off 5:on 6:off
postgresql 0:off 1:off 2:off 3:on 4:off 5:on 6:off