Mail store not shrinking after offline defrag, exch 2007

Posted on 2011-03-22
Last Modified: 2012-05-11
Hello all,

I have a pretty urgent and serious problem that needs to be resolved.
Our Exchange server is almost out of space and i am running out of space on the host machine to throw at it.

hardware :
Dell T610
ESX - 5 live servers hosted
836GB Avail on host - 316GB allocated to Exchange server (thin prov)
3 Mail Stores, A-H, H-O and P-Z

Our mailboxes have been growing rapidly, i have spent a week clearing out mail any older than 1 year to a PST and moving the PST's to a NAS so the space is "Free" on the server / host. As the allocated space is thinly provisioned when i move the mails out the disk volume remains the same, i thought that any new mail received will write to the white space, our mail stores are still growing, we had 3gb left last night, SO. i mounted a temp volume on the exchange server to run the defrag, mail store size +110%.

I have cleared out around 60gb.

So away i went to run an offline defrag using this command:

"C:\program files\microsoft\exchange server\bin" Eseutil.exe /d "D:\Program Files\Microsoft\Exchange Server\Mailbox\H-O Storage Group\H-O Mailbox Database.edb" /t "E:\H-O Mailbox Database\H-O Mailbox Database.edb"

C is the install of EXCH, D is the location of the Mail stores and E is the temp volume.

This was a 55gb store that i know was down to about 43gb, once the defrag completed, the store was still the same size, OK, so i ran the same command on the larger P-Z mail store with the same result, no decrease in store size.

Please can you help me here.

Many thanks


Question by:QuadrisIT

Accepted Solution

Saoi earned 125 total points
ID: 35191348

If you have space the easiest way to reduce white space would be to do the following:

Create a Temporary Database.
Move users from the DB you intend to re-create to the Temp DB.
Once all the users are moved, dismount the original DB.
Delete the .EDB file from the path of Original DB.
Mount the Original DB – it will create a blank .EDB file.
Move users back to the newly created DB from the Temp DB.

Depending on your setup of course - you'll need some space to move users around.


Expert Comment

ID: 35191483
If i have read this correctl your command should have compacted the database and put the niw compact version in  "E:\H-O Mailbox Database\H-O Mailbox Database.edb".
Your original database in d:\ will not be replaced as you have specified the new location with th /t switch.

Can you confirm if the file in the temp location is smaller than the original and that the new size matches the database holes stated in the event log (event id it 1221 i think)

LVL 17

Expert Comment

by:Viral Rathod
ID: 35191515
First check the white space on the above database using event id 1221 ,if you have deleted large amount of e-mails then you need to set Keep Deleted E-mails items to 0 days and then need to run online maintanance to generate white space

I guess you might forget to set the "keep deleted items to 0 days" ,Please check Event Id 1221 and letus know the results.

LVL 31

Expert Comment

ID: 35192545
As everyone has already said, check for event 1221...
Also look at your deleted item retention settings
LVL 17

Expert Comment

ID: 35198813
All great information from the others and you are definitely going to want to set the retention to 0 and then check to ensure that you are getting a 1221 for each respective database before doing an offline defrag.

If you are not getting a 1221, it could be because of an overlap with your backup product i.e.  by default, online defragment runs from 1AM - 5AM every day. However if for some reason online defragment against this database cannot finish in the set time frame you will get the event 3864 which in short says that online defragment will resume the next day. When the online defragment finishes you will get the 1221 which will tell you how much white space can be reclaimed.

NOTE: if you want to force maintenance you can temporarily widen the window to run all the time until you see a 1221 and then roll back to the default 1AM to 5AM setting, HOWEVER, realize that this will impact server performance so do not leave the maintenance window widened as a default.


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
In this video we show how to create a Contact in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Contact ta…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question