Sunday, February 1, 2009

running an offline defrag of an Exchange Server

An Exchange server runs an online defrag nightly to optimize space usage, but an offline will do a complete rebuild of the information store for more efficient use of space and full recovery of space of purged mailboxes.

In this case, I had the information store on the E drive, but the E drive did not have enough space to hold the offline defrag, so I had to redirect it to the U drive (an external USB drive attached for backup).

The command I ran was:
C:\Program Files\Exchsrvr\bin>eseutil /d /p "e:\exchsrvr\mdbdata\priv1.edb" /t"u:\defrag\defragged.edb"

This 43.5 GB information store (before the defrag) took 4.21 hours. The defrag brought the information store down to 34.5 GB.

NOTE - in the example above, the folder "defrag" must exist before running this file. It won't create it automatically. You'll get an error if it doens't exist.

No comments: