Solved

space filled with Exchange Database

Posted on 2013-11-22
26
261 Views
Last Modified: 2013-12-12
space filled with Exchange Database

when I run this command: Get-MailboxDatabase -Status | select ServerName,Name,DatabaseSize
one of my databases shows 161.3GB

when I run this command to see what is inside of it:
 [PS] C:\windows\system32>Get-MailboxDatabase disabled | Get-MailboxStatistics |ft displayname,Totalitemsize

the totalitemsize shows roughly 7GB

I wonder what is taking all that space (roughly 161-7=154GB)

Any idea?

Thanks
0
Comment
Question by:jskfan
  • 11
  • 4
  • 4
  • +3
26 Comments
 
LVL 4

Assisted Solution

by:FutureTechSysDOTcom
FutureTechSysDOTcom earned 50 total points
ID: 39670191
Hmmm... Are you sure it's really only 7 gigs in there?  How many users are we talking?  I'm just wondering if that script is giving you all of the info.

There are some compacting and defrag options, but before I suggest any of those I'd like to be sure what we're dealing with.
0
 
LVL 6

Assisted Solution

by:LectricX
LectricX earned 100 total points
ID: 39670253
Your first powershell command queries the exchange environment for all of the names of the Mailbox Databases.  (names changed to protect my environment)

get-mailboxdatabase -status | select ServerName,Name,DatabaseSize

ServerName                              Name                                    DatabaseSize
----------                              ----                                    ------------
ABEXMB02                                AB Mail                                 120 GB (128,865,337,344 bytes)
XYEXMB02                                XY Mail                                 52.38 GB (56,246,730,752 bytes)


So, your next query confuses me here, because you list
Get-MailboxDatabase disabled | Get-MailboxStatistics |ft displayname,Totalitemsize

This means that "disabled" is the name of your database?

In my case, I ran:
get-mailboxdatabase "AB Mail" | Get-MailboxStatistics |ft displayname,Totalitemsize

and I got a stack of responses reporting each mailbox and it's individual size.
get-mailboxdatabase "AB Mail" | Get-MailboxStatistics |ft displayname,Totalitemsize

DisplayName                                                 TotalItemSize
-----------                                                 -------------
Getafix, Frank G.                                          90.45 MB (94,846,696 bytes)
Levereaux, Brent                                             223 MB (233,860,939 bytes)

Each of these 'TotalItemSize' is the size of that users mailbox only.
I had enough mailboxes (~300) that the output ran off the screen.  I don't know if you actually have a mailbox database called 'disabled'.
So, I didn't get a SUM of all the mailboxes running this command, so if you have LOTS of mailboxes, you need to pipe the out the output to a text file...

get-mailboxdatabase "AB Mail" | Get-MailboxStatistics |ft displayname,Totalitemsize > c:\temp\output.txt

Hope this helps.
0
 

Author Comment

by:jskfan
ID: 39670259
about 10 Users
I ran this command:
[PS] C:\windows\system32>Get-MailboxDatabase -Status | Sort-Object DatabaseSize -Descending | Format-Table Name, DatabaseSize, AvailableNewMailboxSpace

and it shows databsesize=161
AvailableNewMailboxspace=155GB

it got to be filled with White Space.
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 6

Expert Comment

by:LectricX
ID: 39670281
Well done..
If you want to recover some of that space:
http://exchangeserverpro.com/defrag-exchange-2010-mailbox-database/
0
 

Author Comment

by:jskfan
ID: 39670303
I do not need to do Defrag.

What I need is, we have Users who quit the company and  have Active Directory accounts disabled, but the mailbox is not disabled, I will have to find each AD disabled account and then search for equivalent mailbox then move it to the database that has a lot of white space.

I wonder if there is an easy way ?
0
 
LVL 6

Assisted Solution

by:LectricX
LectricX earned 100 total points
ID: 39670318
http://exchangeserverpro.com/move-mailboxes-exchange-server-2010/

I know it's cheating, but I'd follow this guide to bulk move mailboxes based on a filter set in the recipient list..

Looks like it should be your answer..

Best of luck.
0
 

Author Comment

by:jskfan
ID: 39670607
when I move  mailboxes from one database to another, it might create log files too. correct ??
if so the logs I guess will be created in the Target database... ??
0
 
LVL 6

Expert Comment

by:LectricX
ID: 39670675
Log files are typically small. They will end up in the log file separate to the database file.
0
 

Author Comment

by:jskfan
ID: 39684189
In a different question , I have been told that the log files size will end up with the same size as the size of the mailboxes that have been moved.


This is why I wan t an answer for someone who have done the move of the mailboxes.
0
 
LVL 37

Assisted Solution

by:Jamie McKillop
Jamie McKillop earned 150 total points
ID: 39701129
Hello,

You are correct that the log files generated will be the same size as the mailboxes being moved. If you have a very large amount of data to move, you should move it in groups and do backups between the groups to clear the transaction logs.

You should only move mailboxes into the database with a ton of whitespace if you can balance you databases such that each one doesn't have an excess of whitespace after the moves. If you can't do that, I would recommend moving the mailboxes out of the database with a ton of space, dismount the database, delete the database and logs from the disk, then remount the database. This will create a new database will no whitespace. You can then move mailboxes back to that database to balance things out.

-JJ
0
 
LVL 27

Assisted Solution

by:Steve
Steve earned 150 total points
ID: 39702123
I do not need to do Defrag.

That's a matter of opinion. With so much 'wasted' space in your database I think a defrag is a reasonable recommendation.

I think it would be helpful to know what your aims are, as your initial question was askinh what the unexplained space was in the DB, then your query changed to an unexplained need to move mailboxes into the DB with space in.

knowing what are you trying to achieve will help us answer your question......

EG:
Do you still need to know what the unexplained space is for?
Do you need help moving mailboxes?
Why are you moving them?
0
 
LVL 22

Assisted Solution

by:yo_bee
yo_bee earned 50 total points
ID: 39703010
Have you thought of creating a new DB and moving the active users to the new DB and decommission the old wasted space DB
0
 

Author Comment

by:jskfan
ID: 39703409
Totallytonto

My databases are all over 100GBs and they go to different drives.
Log files of all my databases go to one Drive named X: drive

Now I need either to create a new blank database and start moving from each database few mailboxes to the newly created database.

OR

I will move from each database few mailboxes to the exiting database that I previously mentioned and that has a huge amount of white space.

I have not done that before, I wonder if the wizard will ask me to the location of the log files that will be created?
we do full backup of our databases on week ends, so do you think it would be preferable to do the move of mailboxes on Friday ?
0
 

Author Comment

by:jskfan
ID: 39703411
That been said… AFter moving few mailboxes from each database to the new database, then I need to balance between the existing databases…..I mean if DB1 is larger thane DB2 , then I will move few mailboxes from DB1 to DB2 , the same will apply for the rest of the databases .
0
 

Author Comment

by:jskfan
ID: 39703413
I guess the full back up is crucial after the move… ??
0
 
LVL 27

Expert Comment

by:Steve
ID: 39704147
Thanks @jskfan,

So you intend to balance out the mailboxes between various DBs? Sounds good to me.

If you have a DB containing loads of white space it is perfectly safe to reuse it. Just make sure your old mailboxes were deleted for longer than the retention periods set for the DB, or they will still be there and there wont actually be any space.
Once the retention periods have been satisfied, the old data would be removed during the next maint operation (usually overnight)

If you would prefer to create a new, clean DB there's no reason not to as such. when creating a new DB you can specify the log file location but you can move them anytime if necessary.

With regard to backups, I always recommend taking backups before and after any major work so you have as many options as possible in the event of an issue.

If you intend to move a lot of mailboxes, keep an eye on the log file size and consider moving a limited number of mailboxes per day so the backups clear the logs for you before moving more.
0
 

Author Comment

by:jskfan
ID: 39704558
i did not get this:

<<<Just make sure your old mailboxes were deleted for longer than the retention periods set for the DB, or they will still be there and there wont actually be any space.
Once the retention periods have been satisfied, the old data would be removed during the next maint operation (usually overnight)  >>>>
0
 

Author Comment

by:jskfan
ID: 39704566
when I move mailboxes from one database to another… then i should go back and delete manual the mailboxes that have been moved from their original database or they get deleted automatically after the move is done.??
0
 
LVL 27

Assisted Solution

by:Steve
Steve earned 150 total points
ID: 39705759
deleting mail/mailboxes doesn't immediately result in the items being deleted as they remain in the database for a period of time (retention period) before actually being removed.

if you delete a load of stuff and expect to be able to reuse the space you need to allow the retention period pass, or reduce the retention period to 0.
0
 
LVL 37

Assisted Solution

by:Jamie McKillop
Jamie McKillop earned 150 total points
ID: 39705973
Whitespace is data that has already been purged. Since he is moving mailboxes, and not deleting them, he doesn't need to worry about the dumpster.

-JJ
0
 

Author Comment

by:jskfan
ID: 39710491
What I meant is:

l need to move mailboxes from DB1 to DB2 then:
-- Would the wizard ask me where to put the log files that will be created in the destination drive, assuming DB1 and DB2 are in different drives

--- when I move mailboxes from DB1 to DB2 , then if I check DB1, would I still see the mailboxes that I moved ?…if the answers is Yes..the operations needs to be called COPY mailboxes…if the answer is No then it can be called MOVE mailboxes.
0
 
LVL 27

Assisted Solution

by:Steve
Steve earned 150 total points
ID: 39710980
to clarify, the warning about deleted mail/mailboxes related to DELETED items/mailboxes and does not apply when moving a mailbox form one DB to another.

Apologies if the original warning of retention periods got mixed in with the query on moving mailboxes.....


Would the wizard ask me where to put the log files that will be created in the destination drive, assuming DB1 and DB2 are in different drives

No. the logs are placed based on the destination mailboxdb's existing settings.
0
 
LVL 37

Accepted Solution

by:
Jamie McKillop earned 150 total points
ID: 39711135
when I move mailboxes from DB1 to DB2 , then if I check DB1, would I still see the mailboxes that I moved ?…if the answers is Yes..the operations needs to be called COPY mailboxes…if the answer is No then it can be called MOVE mailboxes.

The answer is no. It is a move mailbox process. The mailbox cannot exist in more than one database.

-JJ
0
 

Author Closing Comment

by:jskfan
ID: 39715234
Thank you Guys
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this step by step procedure, you will come to know the details of creating an Outlook meeting in 2007, 2010, 2013 & 2016.
To show how to create a transport rule 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 Mail Flow >> Rules tab.:  To cr…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

816 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now