I ran isamchk -a, and then isamchk-S in a script dialy and noticed today the
following errors!
What causes a database table to get corrupt, and why would it happen to so many
of them?!
There were a bunch of databases that had errors like these:
ISAM-table '/var/lib/mysql/wt_api/AppliesTo_Table.ISM' is useable but should
be fixed
ISAM-table '/var/lib/mysql/wt_api/Function_Table.ISM' is corrupted
Fix it using switch "-r" or "-o"
This is a new VA Research server (2 months old).
(server is RH5.2, 512MB RAM, 36GB RAID5 drive, Dual PIII-500Mhz)
I have set up a script to run daily in /etc/cron.daily. Is this wrong to do?
Also, I set /etc/my.cnf to be:
[isamchk]
set-variable = key_buffer=16M
set-variable = sort_buffer=16M
set-variable = write_buffer=16M
set-variable = read_buffer=16M
should I add anything else here?
[root=ttyp0]2:13pm@{/etc/cron.daily}> cat mySQL-isamchk-daily
#!/bin/bash
echo ""
echo "mySQL-isamchk-daily: Checking database integrity..."
/usr/bin/isamchk -o /var/lib/mysql/wt_client/*.ISM
/usr/bin/isamchk -a /var/lib/mysql/wt_client/*.ISM
/usr/bin/isamchk -S /var/lib/mysql/wt_client/*.ISM
/usr/bin/isamchk -o /var/lib/mysql/wt_api/*.ISM
/usr/bin/isamchk -a /var/lib/mysql/wt_api/*.ISM
/usr/bin/isamchk -S /var/lib/mysql/wt_api/*.ISM
/usr/bin/isamchk -o /var/lib/mysql/wt_bug/*.ISM
/usr/bin/isamchk -a /var/lib/mysql/wt_bug/*.ISM
/usr/bin/isamchk -S /var/lib/mysql/wt_bug/*.ISM
/usr/bin/isamchk -o /var/lib/mysql/mysql/*.ISM > /dev/null
/usr/bin/isamchk -a /var/lib/mysql/mysql/*.ISM > /dev/null
/usr/bin/isamchk -S /var/lib/mysql/mysql/*.ISM > /dev/null
echo ""
echo "Fix any errors mentioned above."