Solved

Exchange 2010 Offline Defrag

Posted on 2012-04-01
17
1,450 Views
Last Modified: 2012-06-21
we have Exchange Server 2010 at disaster recovery site which is running out of space, some of the staff who were high on the list in terms of mailbox storage has been contacted, and their mailboxe size has been reduced.

Mailbox clear out doesnt reflects the size on the Exchange Server, so we had to purge the accounts.

But it still didnt represent the free space on the physical drive, so I am planning to do an offline defragmentation?
So can you please assist me in carrying out the steps to do an offline defragmentation, and if anything goes wrong how can roll back to where i was?
Also offline defragmentation, how long it will take? and what it affect the primary site?
0
Comment
Question by:Leo
17 Comments
 
LVL 3

Expert Comment

by:Padamdeep
ID: 37794782
Why do you want to run Offline Defrag just to see how much database has shrunk?

This is what you should look at.

1. Has online maintenance been completed on the Database?
2. If it has completed then look for the Online Maintenance events in the App logs and it'll tell you how much Free space does this DB has.

If you really want to see the space reflected on NTFS then you need to run the Offline Defrag. It's a time consuming process and needs outage for many hours depending on size if database.

I don't see any implication of running Offline Defrag. Offline Defrag creates a New DB altogether and once the offline Defragmentation is completely run on the fragmented DB. It replaces the New Defragmented DB with Fragmented DB. This is what happens in the background. That's why it is recommended to have 100% of free space available to run defragmentation OR calculate the space that you need using space Dump. Specify the Temp path on the same drive for saving time on replacing the DB.

Therefore if it fails it is going to discard the New Defragmented DB and won't do anything to Production fragmented DB.

I hope it helps.

~ Singh
0
 
LVL 19

Accepted Solution

by:
Miguel Angel Perez Muñoz earned 167 total points
ID: 37794843
Making offline defrag of your database, reclaims unused space as free. But during this process, users on this database can´t access to mailbox. This is procedure: http://support.microsoft.com/kb/328804 and if your server runs out of space, will need to use another disk because you need as least 110% database free space on disk to do this.
0
 
LVL 24

Assisted Solution

by:Rajith Enchiparambil
Rajith Enchiparambil earned 167 total points
ID: 37794959
As you have deleted some content, the database has white space in it. You won't see any decrease in physical disk size.

The way it work is if your database is 100GB in size and you have deleted 20GB, your physical size will still be 100GB. The 20GB is called white space. But, your database won't grow until you have filled up that 20GB.

So, you will only see an increase in size, if your users fill up the database beyond 20GB.

As 2010 has online maintenance 24X7, I would say not to do any offline defrag. It is not going to do you much good, except to have a "visual" decease in physical size.
0
 
LVL 8

Author Comment

by:Leo
ID: 37798939
Thanks for all your suggestions, if i can achieve and compact the size of the physical drive then i dont have to worry about offline defrag :-)

i have just run exchange console as an administrator and when i try to see the white space, by using this command;

[PS] C:\Windows\system32>Get-MailboxDatabase General Users Storage Group 2010 -Status | FL AvailableNewMailboxSpace
A positional parameter cannot be found that accepts argument 'Users'.
    + CategoryInfo          : InvalidArgument: (:) [Get-MailboxDatabase], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Get-MailboxDatabase

I get an error?
we have five databases, so is the syntax right to check the white space?

and how i will check that online maintenance is running on all the databases?
0
 
LVL 8

Assisted Solution

by:Leo
Leo earned 0 total points
ID: 37799017
i got the right script :-) now its running...
Get-Mailboxdatabase -Status | FL Identity, AvailableNewMailboxSpace
0
 
LVL 8

Author Comment

by:Leo
ID: 37799125
I am bit confused now :-) i am looking at the physical hard drives, each database is associated with a separate drive, now on primary server there is around 50 GB free on each drive but when i run
Get-Mailboxdatabase -Status | FL Identity, AvailableNewMailboxSpace

it shows that for each database there is round about 900-500 MB left and for some databases its saying there is only 130 MB left, so how does it calculate the free space? is it calculating the drive space on the DR server, which is having space issues? because it needs to replicate their.
0
 
LVL 3

Expert Comment

by:Padamdeep
ID: 37799293
Look at the App Logs Online Maintenance events and check if you see same amount of white space there. That will clear your confusion.

~ Singh
0
 
LVL 8

Author Comment

by:Leo
ID: 37799354
where i can find that information?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 8

Author Comment

by:Leo
ID: 37799360
I found it, and i saw it has run and completed, but its showing it run for 0 seconds, requring 1 invoations over 1 day....is it normal?
but i was not able to find event ID 1221...to look at free space...
0
 
LVL 3

Assisted Solution

by:Padamdeep
Padamdeep earned 166 total points
ID: 37799362
Event Viewer > Application Logs

Following article should answer all your questions

http://blogs.technet.com/b/exchange/archive/2011/12/14/database-maintenance-in-exchange-2010.aspx

~ Singh
0
 
LVL 8

Author Comment

by:Leo
ID: 37808915
Just wanted to make sure that if i choose to do an offline defrag...i can stop it in the middle, if its taking too much time, and if it has created a new DataStore, it will fall off to the first one, and eveything will be as normal?
0
 
LVL 3

Expert Comment

by:Padamdeep
ID: 37809301
Yes. Everything will be normal even if you stop it in the middle.

To be on safe side, make a offline copy of Production DB before you start offline Defrag.

~ Singh
0
 
LVL 8

Author Comment

by:Leo
ID: 37825891
Now i have changed the retention policy, and asked the users to clear out their mailboxes, and i can see the white space has increased, but i dont see the same empty space on the physical drive?
0
 
LVL 3

Expert Comment

by:Padamdeep
ID: 37826145
This is what everyone is explaining. White space doesn't reflect in the Physical drive. Database will utilize the white space first and then start utilizing the space on physical drive. Therefore as long as you have white space in DB, your Database size on physical disk will not grow.

If you want to see the free space reflected on physical drive then you need to run the Offline Defrag.

Please go through the article that I have given above.

~ Singh
0
 
LVL 8

Author Comment

by:Leo
ID: 37836181
thanks, kindly let me know if i am doing this right....

i have right clicked on a database--> properties--> Limits and for keep deleted items for days, i have set it to 1.

would that mean that when people delete their emails and it goes to deleted items folder, it gets cleared out? and i can see white space on that database on the next day?

if i am wrong please direct me to the right path.....
0
 
LVL 3

Expert Comment

by:Padamdeep
ID: 37845563
yes, you should see the White space after 24 hours.

~ singh
0
 
LVL 8

Author Closing Comment

by:Leo
ID: 37928240
Find script to run, and it worked.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

OfficeMate Freezes on login or does not load after login credentials are input.
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

747 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

13 Experts available now in Live!

Get 1:1 Help Now