Avatar of racisco
racisco
 asked on

My Exchange 2010 mailbox size is getting too big

I have 4 mailboxes database. one of them is too big it's like 92%
the .edb File Size Grows Too Large
I run a full backup, but  that didn't shrink my database
When i checked the white space:

Name     DatabaseSize                     AvailableNewMailboxSpace
----     ------------                     ------------------------
Mailbox1 185.6 GB (199,323,877,376 bytes) 240 MB (251,625,472 bytes)
Mailbox2 84.13 GB (90,338,033,664 bytes)  5.862 GB (6,293,946,368 bytes)
Mailbox3 154.1 GB (165,499,437,056 bytes) 699.6 MB (733,544,448 bytes)
Mailbox4  101.8 GB (109,262,733,312 bytes) 2.519 GB (2,704,343,040 bytes)

Please help i'm running out of Disk Space. my mailbox data store has 700GB, but only 52GB left
Log file are on a different drive
Please help ASAP. Thank you very much
Exchange

Avatar of undefined
Last Comment
racisco

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Mahesh

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
MarkMichael

You cannot shrink a mailbox database without doing an offline defrag. Although this process will require around 1.5x your current database size in free space, to complete the task.

Are all your databases on this one drive?

I assume this is a single Exchange server with no other Exchange servers replicating data?

If it was a log drive filling up, then that's when you would need to run a full backup to flush the logs and reduce the capacity, but as this a mailbox database drive, you have limited options. With regards to the whitespace, your users on Mailbox2 will now start to use up that 5.862GB of whitespace before the database starts to expand again.

Options:
1. expand the drive if possible.
2. move a mailbox database to a new drive - http://exchangeserverpro.com/move-exchange-2010-database-folder/

Depending on your usage, 50GB isn't a tiny amount of space and may last a while, which could mean you have sufficient time to purchase additional disks to add into your server. Once you have that, you can move the databases under #2.
Nick Rhode

You can move the mailbox database to another drive if you have or can allocate the additional space.  To removed the whitespace (which doesn't look like much) you would use the defrag utility ESEUtil.  Better and cleaner way would be to create another database and move the data over.  The database will not grow until that whitespace is filled.

One thing you can do is have the users clean up their mail.  I know I have freed up 80gb + by having everyone empty their deleted items bin.  Here are some tips to help.

http://accc.uic.edu/answer/how-do-i-manage-and-reduce-exchange-mailbox-sizes
racisco

ASKER
All the databases are on the same drive
I have another server which we only use it sometimes to perform full backup for exchange, & it has 650GB Drive disk space available.
Can i map this drive on my Exchange server, then create a new database, and point the database to the mapped network drive? .. once i do that i could actually move mailboxes to the new database on that network drive, once completed i could delete the old database and then move the new database from the mapped network drive to the actual drive on my exchange server.
Please advise. those just ideas i came up with based on what you are suggesting, but i haven't done it before.
Please help & thanks again

Also i noticed there is 15GB catalogdata file. do I need to delete this after creating the new database and move mailbox to it >?
Your help has saved me hundreds of hours of internet surfing.
fblack61
MarkMichael

Hi again,

You cannot create a database on a mapped drive unfortunately.

Is this other server you have a fully working Exchange server?

The catalog files are required for part of the Indexing that Exchange does server side, you shouldn't delete these, Exchange will only re-create them too.

How large is your logs drive?
Is this a separate partition on the same disk as the mailbox database drive?
racisco

ASKER
since i cannot create a database on a mapped drive, can i use an external 3TB hard drive connected via USB?

The other server has only operating system Win 2008 R2, and nothing is installed on that server.

log files is 2GB, but they are on different partition on the exchange server.
MarkMichael

I wouldn't suggest using a USB drive either, USB isn't meant for having multiple connections from users to storage it presents,

I really would look into purchasing some cheap hard drives for your server. Even 2x 500GB drives would be a quick and easy fix and you will need additional space for future growth. The 50GB free space you currently have should last you for enough time for you to purchase some disks and present it to the server.

Once you have them, you can move the entire 80GB database from the current to the new drive and release space on the drive that is filling up.

Just a check: how large is your log drive?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
racisco

ASKER
We have Dell poweredge r710
Please see the attached images.
the log drive is 100GB
photo-1.JPG
photo-1.JPG
photo.JPG
MarkMichael

Ok thanks.

How often do you run full Exchange backups?
racisco

ASKER
i just ran it last night... i did custom backup with full VSS backup, the only drives i checked was D " Data store" and F for "Logs"
i backed it up to a the mapped network drive
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
MarkMichael

If you run it daily, you will probably not require that amount of log drive space.

What I'm suggesting is: take Exchange offline.

Copy the entire contents of the log drive to the network drive.

Delete the Logs partition
Expand the Mailbox Data partition with an extra 50GB
Re-create your Log drive with a 50 GB partition instead of 100GB.

That will give you an additional 50GB to play with.

To confirm you can do this, could you check if the Logs partition is next to the data partition on your disk and it is the last partition?

You can do this from Server Manager, Storage > Disk Management
racisco

ASKER
Yes it
Here is what I have
System 100MB……. C: 99.90GB NTFS….Primary partition….. E: 636.62GBData Store “ Primary Partition” ….. F: 100GB Logs “ Logical Drive”
MarkMichael

Ok,

When it's acceptable for your business, I would take Exchange offline, stop all Exchange services.

Take a full copy of your logs drive by copying the contents to a network drive, keeping the file structure in tact. You could also take a backup of this drive only if needs be.

Delete the logs partition
Right click > Expand: Data Store partition +50GB
Right click > Create new partition in remaining space.
Give it the same drive letter as before.
Copy the original contents back, or restore the data from a backup.
Start Exchange services.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
racisco

ASKER
what's the best way to take the exchange offline?
can you please tell me the exact Exchange services that i need to stop?
thank you
racisco

ASKER
We want to stay with 1 server topology and we are about to implement a mailbox size policy, but for now we went around and archived many of large mailboxes, but it seems like we could not get that space back, so what’s the best way to reclaim the space?
For example one of the user has 7GB mailbox, we cleaned it and archived it, and we were able to drop it down to 1GB, but we don’t see the 6GB as an extra available on the disk space.
We believe we cleaned /archives over 30GB of data, but it’s not reflecting on the available disk space on the server
Mahesh

White space cannot be reclaimed with archiving.
You must move all mailboxes from given databases to new databases and wipe out old one

OR take database offline one by one and start offline database defragmentation. But in your existing situation, it is also not possible as you don't have additional space for storing temp edb file during offline defragmentation

better if you could arrange even one 300 to 500 GB server class HDD, your problem will be resolved easily.
Just move all mailboxes in one database immediately on that followed by wipe out original empty database, you will reclaim white space on original Data drive and then create new databases on the same drive and start moving other databases there.

Mahesh
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Joseph Nyaema

Doing an offline Defrag is never a good idea, or is just not practical especially if you do not half enough space to do it on.  You have to also keep in mind that an online defrag is done between 1am and 5am everyday, but does not shrink the database... which is really not a bad thing.

There is always a misconception that if the database fills the drive that the database will go offline and not mount.  This is not necessarily true.  With logs on a separate partition with enough space, the database will mount as long as there is enough space inside the database (white space).  In your case you have about 9GB of white space, which honestly doesn't look like worth all the trouble of an offline defrag, with your smallest database being about 100GB, guessing you don't have the space or the time to defrag on. (would take about 8 to 12 hours, not to mentions about 100 to150GB of free space.

Although you have white space, it does not mean its is unusable.  The database wont grow until after the white space inside it is used up. So do not only look at the free disk space when calculating your free space, add the white space your database to your free disk space to get the total free space you have for your mailboxes.

So how do you go about getting more white space, by getting your users to delete mail, or archive it.  So your object should be getting more white space.  You can plan to expand or add more drives when you are ready.

But you will surprised how many users do not empty their deleted items folder.

You can check the size of the deleted items folder for each mailbox by running the command.  It calculates the total size of items (GB) in all the mailboxes after showing you the per user usage in ascending order in MB

$T=0; ""; ""; "Gathering and sorting Mailbox Statstics in order of size in MB, Please Wait..."; Get-Mailbox | Get-MailboxStatistics |Sort TotalDeletedItemsize | FT DisplayName, DeletedItemCount, @{Expression={$_.TotalDeletedItemSize.Value.ToMB()};Label="TotalDeletedItemsSize "(MB)"}; ""; "Calculating Total space consumed by Deleted Items in all mailboxes..."; Get-Mailbox | %{$T=$T+(Get-MailboxStatistics $_).TotalDeletedItemSize.Value.ToMB()}; $TGB = $T/1024; $M="Total space occupied by Deleted Items in all mailboxes is " + $TGB + " GB"; $M

Open in new window

To delete all the Deleted Items in all mailboxes run the following command

Get-MailBox|Search-mailbox -SearchDumpsterOnly -DeleteContent

Open in new window

Remember enough white space is also good, don't need to go into all the trouble of offline defrag.  Though your database is not shrunk after an online defrag, it reserves that space for future use.

racisco

ASKER
I set up a mailbox role on a different Exchange server and created a new mailbox database there.
I started moving the mailboxes.
I moved mine 1st which was 1.2GB.
before i moved the 2nd mailbox,  I checked the mailbox size through mailbox properties and it was "183047KB", when i moved that mailbox to the new mailbox database, the EDB file went from 1.3GB to 9GB . if the 2 mailbox size was about 1.8GB Where that 9GB is coming from?
Please note that we archived the user mailbox couple days ago to a PST file on his PC because his mailbox size was 7.5GB.

I thought moving the mailboxes over to the new database will move only mailbox data! Please HELP
Joseph Nyaema

Must be the dumpster, the place where de

Open in new window

le

Open in new window

ted mail is taken after emptying the deleted items folder to enable the Single Item Recovery feature.  Moves with your mailbox. Retention period is governed by your deleted items retention policy.

following against your mailbox to see how space you free up before running it against everyone.

Search-mailbox username -SearchDumpsterOnly -DeleteContent
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
MarkMichael

These deleted items will not disappear for up to 30 days, depending on the settings on your database itself. As Nyaema has rightly suggested, you should run the powershell command above, to clear down the dumpster of these deleted items.

Do you have a lot of space on this new server?
racisco

ASKER
You guys right I found out we are copying the dumpster with the mailbox to the new database. We need to clear the dumpster before we move the mailbox.

Is there anyway to clear the dumpster for all mailboxes instead per user?

Thank you
Mahesh

Check below article to find out the Deleted item size for all users and then do clean up per user basis

http://social.technet.microsoft.com/Forums/en-US/d189d595-8abf-4ef0-8c0d-db7a22a37753/exchange-2010-database-size-larger-than-expected-after-mailbox-move

Mahesh
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
racisco

ASKER
See below
[PS] C:\Users\arobert\Desktop>Get-mailboxstatistics  Paul |fl *name, *Item*
 
 
PSComputerName       : server1.domain.com
DisplayName          : Paul
ServerName           : Exchnageserver3
DatabaseName         : mailboxdatabase2
AssociatedItemCount  : 154
DeletedItemCount     : 36446
ItemCount            : 18691
TotalDeletedItemSize : 5.51 GB (5,916,227,690 bytes)
TotalItemSize        : 1.746 GB (1,874,511,644 bytes)
 
 
[PS] C:\Users\Admin\Desktop>Get-MailboxDatabase -Status | ft name,databasesize,availablenewmailboxspace -auto
 
Name     DatabaseSize                     AvailableNewMailboxSpace
----     ------------                     ------------------------
mailboxdatabase2  9.008 GB (9,672,130,560 bytes)   5.542 GB (5,950,832,640 bytes)

As you can see we are copying the dumpster with the mailbox to the new database, So i need to delete the dumpster for each user before moving the mailbox to the new database. I think it's going to be pain in the neck to do it per user.... so i was thinking if there is a powershell command to clear all mailboxes in the old database instead clear each user Dumpster
Any ideas?
Mahesh

I don't think command will work on Database level
What you can do, list (Export) all mailboxes in Excel, use concatenate Excel function to populate command for all mailboxes, then copy all rows and paste in shell
Hopefully it should work
At least you can try

Mahesh
racisco

ASKER
That's Great!
Please confirm the following command is the one i need to use to delete dumpter
Search -mailbox -identity <alias> - searchdumpsteronly -deletecontent

Thanks
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
MarkMichael

That will work per user.
Mahesh

yes, you are right

Mahesh
racisco

ASKER
You guys are awesome... thank you all very much for your great multiple solutions
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
racisco

ASKER
What's the best command to export mailbox names within a database ?
I have 4 mailbox database... I need to export mailbox names on database1
Thank you
Mahesh

Try below

Get-MailboxDatabase "Database" | Get-MailboxStatistics | Sort totalitemsize -desc | Export-CSV C:\mailboxes.csv

Mahesh
racisco

ASKER
That's exactly what I was looking for Thanks Mahesh
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.