0

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?

5
  • Why are you trying to defrag it in the first place? You are generally better off moving all the mailboxes to a new database, which can be done online with no service interruption.
    – Grant
    Jun 1, 2015 at 12:35
  • I am defragging in order to claim back the Whitespace data.
    – user291788
    Jun 1, 2015 at 13:26
  • Could it be that that database is corrupted?
    – user291788
    Jun 1, 2015 at 13:30
  • JET errors when running eseutil are usually not a good sign. I can't find any specific info on that particular JET error but I would suggest extreme caution at this point. Have you remounted this mailbox database? Take a look in the Application event log for any events related to Exchange. If things go south with this mailbox database you're looking at an expensive Microsoft PSS case and a lot of moaning and gnashing of teeth from your users and your management.
    – joeqwerty
    Jun 1, 2015 at 16:11
  • Well when I researched the JET error it suggested that the Database is corrupt. But this doesn't make sense because I dismounted it and remounted it numerous times and it works fine. Mailboxes in that Database are also working perfectly fine. I guess I'll just have to convince my manager and go with @Grant 's approach.
    – user291788
    Jun 2, 2015 at 9:51

2 Answers 2

0

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

3
  • I had a word with my manager explaining the method of creating a new database. He refuses to go down that route - he'd rather do a defrag. So I guess I just need to know the cause of that error and how to fix it.
    – user291788
    Jun 1, 2015 at 14:16
  • @user291788 your manager refuses to use the easier, safer method that has less downtime? Added a quote from technet explaining that the exchange team recommends doing it this way.
    – Grant
    Jun 1, 2015 at 15:03
  • Grant is on point here. Manually defragging the mailbox database to reclaim whitespace isn't the recommended way of achieving that. You're risking doing more harm than good. Your manager is wrong on this issue. If you proceed down this road be prepared for some probable pain. JET errors are never good.
    – joeqwerty
    Jun 1, 2015 at 16:13
0

As everyone is suggesting, defragmentation is not recommended or necessary. The best way to create a new mailbox database, and move all the mailboxes to the new database. Here is detailed guide for claiming whitespace.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .