[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 272
  • Last Modified:

space filled with Exchange Database

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
jskfan
Asked:
jskfan
  • 11
  • 4
  • 4
  • +3
10 Solutions
 
FutureTechSysDOTcomCommented:
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
 
Nathan PSystems ArchitectCommented:
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
 
jskfanAuthor Commented:
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
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 
Nathan PSystems ArchitectCommented:
Well done..
If you want to recover some of that space:
http://exchangeserverpro.com/defrag-exchange-2010-mailbox-database/
0
 
jskfanAuthor Commented:
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
 
Nathan PSystems ArchitectCommented:
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
 
jskfanAuthor Commented:
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
 
Nathan PSystems ArchitectCommented:
Log files are typically small. They will end up in the log file separate to the database file.
0
 
jskfanAuthor Commented:
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
 
Jamie McKillopCommented:
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
 
SteveCommented:
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
 
yo_beeDirector of ITCommented:
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
 
jskfanAuthor Commented:
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
 
jskfanAuthor Commented:
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
 
jskfanAuthor Commented:
I guess the full back up is crucial after the move… ??
0
 
SteveCommented:
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
 
jskfanAuthor Commented:
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
 
jskfanAuthor Commented:
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
 
SteveCommented:
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
 
Jamie McKillopCommented:
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
 
jskfanAuthor Commented:
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
 
SteveCommented:
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
 
Jamie McKillopCommented:
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
 
jskfanAuthor Commented:
Thank you Guys
0

Featured Post

Independent Software Vendors: 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!

  • 11
  • 4
  • 4
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now