Hardware and Operating System

zmdbintegrityreport

Description

As noted in the ZCS Administration Guide [1], zmdbintegrityreport is a crontab task that runs once a week, to check the MySQL database for corruption. zmdbintegrityreport essentially is a wrapper for mysqlcheck, a standard MySQL tool that is distributed with the MySQL package.

zmdbintegrityreport is run weekly to check the MySQL database for corruption and will notify the administrator if any corruption is found. When this is run, it may consume a significant amount of I/O. If you find that it is an issue, you may want to change the frequency with which zmdbintegrityreport is run by editing the ZCS crontab entry.

Usage

zmdbintegrityreport should be run by the user "zimbra". zmdbintegrityreport can be run with the following options:

zmdbintegrityreport just runs a standard mysqlcheck. There are options to mysqlcheck that allow more extensive checks, such as "-m" and "-e". The standard check puts a lower load on the MySQL database, and requires less time. However, a more extensive check can be used to perform a row-by-row table analysis:

-m, --medium-check Faster than extended-check, but only finds 99.99 percent
of all errors. Should be good enough for most cases.
-e, --extended If you are using this option with CHECK TABLE, it will
ensure that the table is 100 percent consistent, but will
take a long time. If you are using this option with
REPAIR TABLE, it will force using old slow repair with
keycache method, instead of much faster repair by
sorting.

Database Load

zmdbintegrityreport (mysqlcheck) does put load on the MySQL database, which in turn can cause higher latency and slower performance from mailboxd. It runs by default late on Sunday nights in order to limit impact to users. It is important to confirm it is completing by the time of peak load - if it is not, the crontab entry can be adjusted to use a different time (note: check cron entries again after every upgrade).

If choosing to disable zmdbintegrityreport altogether, Zimbra would recommend running zmdbintegrityreport manually regularly in order to check the database integrity.

Configuration

Sites may opt to disable this by setting the following:

zmlocalconfig -e zmdbintegrityreport_disabled=TRUE

If you choose to disable this, it is recommended that the integrity report be run by hand during the normal maintenance windows and prior to running any ZCS upgrades.

Timing

Your mileage may vary, but an example time is provided here. For reference, the database size of this server is:

Error About "Table upgrade required. Please do "REPAIR TABLE "

Please consult the Release Notes for the ZCS version that you most likely upgraded to. It will probably have a reference in the "After the upgrade is complete" section about needing to run a script to upgrade the db. Something like :

/opt/zimbra/libexec/scripts/migrate20100913-Mysql51.pl

NOTE : Don't just run the above script, it's an example. Consult the specific Release Notes for the version you upgraded to.