Fixing Corrupted Mailbox Index

Issue: 

Fixing Corrupted Mailbox Index


Statement:

Mail messages and attachments are automatically indexed before messages are deposited in a mailbox. 

Each mailbox has an index file associated with it. This index file is required to retrieve search results from the mailbox.

If a mailbox’s index file becomes corrupt or is accidentally deleted, you can re-index the messages in the mailbox from the Administration Console.


Description:

Text searches on an account might or might not fail with errors when the index is corrupt. 

You cannot count on a user reporting a failed text search to identify that the index is corrupt. 

You must monitor the index log for messages about corrupt indexes. If the server detects a corrupt index, 

a message is logged to the Zimbra mailbox.log at the WARN logging level. The message starts with Possibly corrupt index. 

When this message is displayed, the administrator must correct the problem. In many cases correcting the problem might mean reindexing the mailbox.


Reindexing a mailbox’s content can take some time, depending on the number of messages in the mailbox. 

Users can still access their mailbox while reindexing is running, but because searches cannot return results for messages that are not indexed, 

searches may not find all results.


Checking for Index Corruption

Run a sanity check on a specific mailbox index using the zmprov verifyIndex command.


zmprov verifyIndex <user@example.com>

If problems are detected, a failure status is returned and a repair can be performed on the index.


Repairing and Reindexing a Corrupt Index

Use the reIndexMailbox command to repair and reindex a corrupt index.


zmprov reIndexMailbox <user@example.com> start

This returns a status of started.



Example Output:

zimbra@mail:/root$ zmprov verifyIndex test1@drbdtest.com

Verifying, on a large index it can take quite a long time...


Segments file=segments_2 numSegments=1 version=3.5 format=FORMAT_3_1 [Lucene 3.1+]

  1 of 1: name=_0 docCount=41

    compound=false

    hasProx=true

    numFiles=8

    size (MB)=0.02

    diagnostics = {os=Linux, java.vendor=Oracle Corporation, java.version=13.0.1, lucene.version=3.5.0 1204988 - simon - 2011-11-22 14:46:51, os.arch=amd64, source=flush, os.version=4.15.0-151-generic}

    no deletions

    test: open reader.........OK

    test: fields..............OK [22 fields]

    test: field norms.........OK [19 fields]

    test: terms, freq, prox...OK [424 terms; 3722 terms/docs pairs; 5610 tokens]

    test: stored fields.......OK [304 total field count; avg 7.415 fields per doc]

    test: term vectors........OK [0 total vector count; avg 0 term/freq vector fields per doc]


No problems were detected with this index.



zimbra@mail:/root$ zmprov reIndexMailbox test1@drbdtest.com start

status: started

Comments

Popular posts from this blog

Cambium cnPilot E400/E410/E500 Configuration Tutorial

Disabling Zimbra's AntiSpam, Amavis and AntiVirus filtering

Error "Unable to retrive Zimbra GPG key for package validation"