MySQL Fails to repair

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
isadmin
Posts: 151
Joined: Thu Nov 08, 2012 10:49 am

Re: MySQL Fails to repair

Post by isadmin »

trying to add system profile fails...profile.zip is 22 MG.....when i attached it the page is reset?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: MySQL Fails to repair

Post by abrist »

There is a maximum attachment size.
Try repairing the table manually:

Code: Select all

cd /var/lib/mysql/nagios/ ; myisamchk -r -q nagios_logentries.MYI
If it fails, try:

Code: Select all

cd /var/lib/mysql/nagios/ ; myisamchk -r nagios_logentries.MYI
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
isadmin
Posts: 151
Joined: Thu Nov 08, 2012 10:49 am

Re: MySQL Fails to repair

Post by isadmin »

both options failed and I even tried the --force option...
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: MySQL Fails to repair

Post by abrist »

If the following does not work, we may have to truncate the table or restore a backup:

Code: Select all

mysql -pnagiosxi -e 'use nagios; repair table nagios_logentries use_frm;'
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
isadmin
Posts: 151
Joined: Thu Nov 08, 2012 10:49 am

Re: MySQL Fails to repair

Post by isadmin »

I may have got it fixed....
I ran
cd /var/lib/mysql/nagios/ ; myisamchk --safe-recover --force nagios_logentries.MYI
and it took awhile but MYSQL has started and I am seeing no current errors....I will monitor and repost after awhile....
isadmin
Posts: 151
Joined: Thu Nov 08, 2012 10:49 am

Re: MySQL Fails to repair

Post by isadmin »

Im getting this in the MYSQL log...I have already expanded the virtual appliance by 5 G once.....

Disk is full writing './nagios/nagios_logentries.TMD' (Errcode: 28). Waiting for someone to free space... (Expect up to 60 secs delay for server to continue after freeing disk space)

Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
16G 15G 8.0K 100% /
tmpfs 2.4G 0 2.4G 0% /dev/shm
/dev/sda1 97M 80M 13M 87% /boot
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: MySQL Fails to repair

Post by lmiltchev »

It seems like you've run out of disk space. You will have to take care of this issue first.
Be sure to check out our Knowledgebase for helpful articles and solutions!
isadmin
Posts: 151
Joined: Thu Nov 08, 2012 10:49 am

Re: MySQL Fails to repair

Post by isadmin »

Extended to 50G and rerunning repair script again
isadmin
Posts: 151
Joined: Thu Nov 08, 2012 10:49 am

Re: MySQL Fails to repair

Post by isadmin »

repair completed successfully! Thanks guys!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: MySQL Fails to repair

Post by slansing »

Excellent!
Locked