• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1541
  • Last Modified:

Exchange 2010 Offline Defrag

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
Leo
Asked:
Leo
4 Solutions
 
PadamdeepCommented:
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
 
Miguel Angel Perez MuñozCommented:
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
 
Rajith EnchiparambilOffice 365 & Exchange ArchitectCommented:
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
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 
LeoAuthor Commented:
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
 
LeoAuthor Commented:
i got the right script :-) now its running...
Get-Mailboxdatabase -Status | FL Identity, AvailableNewMailboxSpace
0
 
LeoAuthor Commented:
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
 
PadamdeepCommented:
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
 
LeoAuthor Commented:
where i can find that information?
0
 
LeoAuthor Commented:
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
 
PadamdeepCommented:
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
 
LeoAuthor Commented:
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
 
PadamdeepCommented:
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
 
LeoAuthor Commented:
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
 
PadamdeepCommented:
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
 
LeoAuthor Commented:
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
 
PadamdeepCommented:
yes, you should see the White space after 24 hours.

~ singh
0
 
LeoAuthor Commented:
Find script to run, and it worked.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now