Tuesday, March 19, 2024

Reset the content index on an MS Exchange DAG environment

Abstract: This short tutorial drives true the steps which can be performed when the content index on an Microsoft Exchange DAG environment should be fully deleted and rebuild from scratch.

Rebuilding the content index fully might be needed when the content index gets corrupt on both MS Exchange DAG member. If only one Exchange DAG member is affected you can fix it as explained here. An failed (or missing) index would lead to multiple issues in the MS Exchange environment, beginning from the automatically balancing (as mentioned here) from an Exchange 2016 DAG cluster over some error messages for your users to missing features like searching via OWA. So this is an often overseen issue but important for the health from your Exchange environment!

A failed index can be found via an monitoring solution, eventlog (see here) or via powershell:

Get-MailboxDatabaseCopyStatus * | Where {$_.ContentIndexState -eq “FailedAndSuspended”}
Get-MailboxDatabaseCopyStatus * | Where {$_.ContentIndexState -eq “Failed”}
Get-MailboxDatabaseCopyStatus * | sort name | ft name,contentindexstate -AutoSize

As long as the index is OK on one MS Exchange DAG member you can simply copy it over as explained here. However if both MS Exchange DAG members are affected as seen in the example below:

Get-MailboxDatabaseCopyStatus * | sort name | ft name,contentindexstate -AutoSize
EXCHMB1\EXCH01             FailedAndSuspended
EXCHMB1\EXCH02             FailedAndSuspended>/span>

you might wish to fully reset it and rebuild it from scratch via the following steps. While you are doing that it might be a good idea to review the article “Finetune the MS Exchange Indexer” here.

1.) On all MS Exchange Server inside the DAG disable the following services (to avoid that they will be auto started):

– Microsoft Exchange Search (MSExchangeFastSearch)

– Microsoft Exchange Search Host Controller (HostControllerService)

And stop both of them (this will not cause any outage for your users).

2.) Now went to the folder (on every MS Exchange DAG member) where the affected DB (the *.edb) is located. In my example it is located inside D:\MailboxDatabases\EXCHMB1. Inside that folder you will see another folder with some numbers in the name. Rename that folder to <oldname>_OLD so you still have it if you need to restore it for some reasons

3.) Now change both services again to automatically and start them. After some time the indexer process will start to re-index the DB. This might cause a high CPU load and depending on your environment users might get some disconnects. So the best option would it be to do that during non office hours.

4.) If you check the status now you see:

Get-MailboxDatabaseCopyStatus * | sort name | ft name,contentindexstate -AutoSize
EXCHMB1\EXCH01                        Crawling
EXCHMB1\EXCH02             FailedAndSuspended

5.) Once the crawling finished you will see the following:

Get-MailboxDatabaseCopyStatus * | sort name | ft name,contentindexstate -AutoSize
EXCHMB1\EXCH01                        Healthy
EXCHMB1\EXCH02             FailedAndSuspended

Then you can copy over the healthy index as explained here.

 

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Stay Connected

35FollowersFollow
- Advertisement -

Latest Articles