I checked disk space and saw where my RAM disk had run out of space. In the past, I've run into issues where the logentries and lognotifications tables are very large (perhaps due to the number of checks we are running (19,000+).
I have resolved this in the past by repairing the database, but by running the command to truncate those two tables.
Upon doing that this time around though, I am getting the following errors:
Code: Select all
- recovering (with sort) MyISAM-table 'nagios_contactnotificationmethods.MYI'
Data records: 116497
- Fixing index 1
/usr/bin/myisamchk: Can't create/write to file '/tmp/STk6hcJB' (Errcode: 28)
myisamchk: error: 28 when fixing table
MyISAM-table 'nagios_contactnotificationmethods.MYI' is not fixed because of errors
Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flagCode: Select all
- recovering (with sort) MyISAM-table 'nagios_objects.MYI'
Data records: 14461
- Fixing index 1
- Fixing index 2
/usr/bin/myisamchk: Can't create/write to file '/tmp/ST2Y2yuf' (Errcode: 28)
myisamchk: error: 28 when fixing table
MyISAM-table 'nagios_objects.MYI' is not fixed because of errors
Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flagCode: Select all
- recovering (with sort) MyISAM-table 'nagios_statehistory.MYI'
Data records: 116310
- Fixing index 1
/usr/bin/myisamchk: Can't create/write to file '/tmp/ST5EMbsL' (Errcode: 28)
myisamchk: error: 28 when fixing table
MyISAM-table 'nagios_statehistory.MYI' is not fixed because of errors
Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag
Code: Select all
[nagios]# cd /var/lib/mysql/nagios
[nagios]# myisamchk -r -f nagios_objects.MYI
- recovering (with sort) MyISAM-table 'nagios_objects.MYI'
Data records: 14461
- Fixing index 1
- Fixing index 2
myisamchk: Can't create/write to file '/tmp/STqGoX5y' (Errcode: 28)
myisamchk: error: 28 when fixing table
MyISAM-table 'nagios_objects.MYI' is not fixed because of errors
Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag
Code: Select all
130923 8:27:07 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_objects' is marked as crashed and last (automatic?) repair failed
Code: Select all
[nagios]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00_ROOT
48G 38G 7.5G 84% /
/dev/mapper/VolGroup00-LogVol00
3.0G 1.6G 1.2G 58% /tmp
/dev/mapper/VolGroup00-LogVol00_VAR
5.7G 3.6G 1.9G 66% /var
/dev/hda1 190M 47M 134M 26% /boot
tmpfs 5.9G 0 5.9G 0% /dev/shm
tmpfs 125M 64M 62M 52% /var/nagiosramdisk
Code: Select all
service mysqld stop
cd /var/lib/mysql/nagios
myisamchk -r -f nagios_<corrupted_table>
service mysqld start
rm -f /usr/local/nagiosxi/var/dbmaint.lock
/usr/local/nagiosxi/cron/dbmaint.php