Exchange 2007 - Deleted mailbox and server space.

Man of Honour
Joined
30 Oct 2003
Posts
14,162
Location
Essex
Hi All,

It's been a damn long time since I have managed an in house exchange system, today I was asked to remove a "monitor" (catch all) account which used transport rules to copy all inbound and outbound messages into the mailbox.

Having tracked all the dependencies for the mailbox and removing the transport rules I then disabled the user which removed the mailbox (mailbox is not in disconnected - presumably because nobody ever logged into it) and space has not been freed up on the server - Now I understand that this is because exchange databases only grow, never shrink.

What I need to know is this, is there a way to free up this space (approx 200gb) while keeping exchange running? For what it is worth I have approx 35gb of free space on the server but several tb of server space on the EVA that this server is sitting on.

Opinions welcomed.
Cheers in advance.
 
You may find the mailbox is not in disconnected state because DB cleanup has not occured, you can force this on a DB by running Clean-MailboxDatabase -Identity "DB Identity".

Due to how whitespace works once a DB hits a certain size, it will never free that storage up until you delete and recreate the DB, OR you perform an offline defrag. I would never recommend performing an offline defrag on a production DB, too risky.

If the rest of the content in the DB is minor your best bet is to spin up a new DB and then move all the content from the old one to the new one. In fact even if it isn't if you want to recover that space moving the content to another DB is still the best option.

Once the old DB no longer has any users on it you can then dismount it, remove the DB and log files (or rename the dirs) and then remount it. Exchange won't be able to find the DB files and will instead mount new ones.

You should be able to see how much whitespace a DB has by checking the mailbox server application event logs for Event ID 1221 - these get created after online maintenance occurs overnight. it will list the DB name and the ammount of whitespace the DB has.
 
That's spot on.
There are also third party apps for defragging stores and recovering the whitespace, whilst the are still up, PerfectDisk from Raxco Software is one that I've used in the past.
 
You may find the mailbox is not in disconnected state because DB cleanup has not occured, you can force this on a DB by running Clean-MailboxDatabase -Identity "DB Identity".

Due to how whitespace works once a DB hits a certain size, it will never free that storage up until you delete and recreate the DB, OR you perform an offline defrag. I would never recommend performing an offline defrag on a production DB, too risky.

If the rest of the content in the DB is minor your best bet is to spin up a new DB and then move all the content from the old one to the new one. In fact even if it isn't if you want to recover that space moving the content to another DB is still the best option.

Once the old DB no longer has any users on it you can then dismount it, remove the DB and log files (or rename the dirs) and then remount it. Exchange won't be able to find the DB files and will instead mount new ones.

You should be able to see how much whitespace a DB has by checking the mailbox server application event logs for Event ID 1221 - these get created after online maintenance occurs overnight. it will list the DB name and the ammount of whitespace the DB has.

Nice one, Sounds like it is really not worth the effort right now. I will look in the morning and check the logs, providing the space is free within the data store I should be gifted enough time that this will not be an issue before an exchange migration later on in the year. The other option is to extend the partition by throwing more space at the VM.
 
Do you require this space back? Exchange will just re-use this space from the purged mailbox and not consume more disk space.
 
Do you require this space back? Exchange will just re-use this space from the purged mailbox and not consume more disk space.

Ideally I would have liked it back but to be honest it can wait as I have a big domain rebuild project on the horison and exchange 2010 is on the cards.
 
Back
Top Bottom