Database – Error when defragging Exchange Server 2010 mailbox Database

databasedefragexchange-2010

I am trying to perform an offline defrag on our Mail server.

We are running Windows Server 2008 R2 Standard, but have Exchange 2010 installed.

I am using eseutil to perform the defrag – however I keep getting an error on PowerShell.

Here's the command I am using:

[PS] D:\EXCHSRVR\regional database\database>eseutil /d regional.edb /t\\mail\temp.edb

Extensible Storage Engine Utilities for Microsoft(R) Exchange Server
Version 14.02
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating DEFRAGMENTATION mode...
        Database: regional.edb

              Defragmentation Status (% complete)

      0    10   20   30   40   50   60   70   80   90  100
      |----|----|----|----|----|----|----|----|----|----|
      X



Operation terminated with error -1022 (JET_errDiskIO, Disk IO error) after 0.94 seconds.

The last bit is the error. I have plenty of space on my server for the temp. files and the database is also dismounted. Any ideas?

Best Answer

With exchange 2010 and up, you don't need to use offline defrag in most circumstances.

The better, fully supported, no downtime method is to create a new mailbox database, and move all the mailboxes to the new database. Exchange 2010 supports moving mailboxes online - so there is no downtime, you can do the moves during the middle of the workday.

If some of the mailboxes are corrupt, it will skip those and let you deal with them when the process is complete - either deleting the mailboxes, or skipping the damaged items and moving the good information over.

Once all the moves are done, you can just delete the old mailbox database. The new mailbox database will be nicely defragged and not have excess whitespace.

You will of course need enough room to store your existing database and the new one briefly. But you need the same thing to do the offline defrag too.

If it helps convince your manager, this is what the Exchange Team has to say about it:

How can I reclaim the whitespace?

Naturally, after seeing the available whitespace in the database, the question that always ensues is – how can I reclaim the whitespace?

Many assume the answer is to perform an offline defragmentation of the database using ESEUTIL. However, that's not our recommendation. When you perform an offline defragmentation you create an entirely brand new database and the operations performed to create this new database are not logged in transaction logs. The new database also has a new database signature, which means that you invalidate the database copies associated with this database.

In the event that you do encounter a database that has significant whitespace and you don't expect that normal operations will reclaim it, our recommendation is:

Create a new database and associated database copies.

Move all mailboxes to the new database.

Delete the original database and its associated database copies.

http://blogs.technet.com/b/exchange/archive/2011/12/14/database-maintenance-in-exchange-2010.aspx

Related Topic