Link to home
Start Free TrialLog in
Avatar of Leo
LeoFlag for Australia

asked on

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?
Avatar of Padamdeep
Padamdeep
Flag of India image

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
ASKER CERTIFIED SOLUTION
Avatar of Miguel Angel Perez Muñoz
Miguel Angel Perez Muñoz
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Leo

ASKER

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?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Leo

ASKER

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.
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
Avatar of Leo

ASKER

where i can find that information?
Avatar of Leo

ASKER

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...
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Leo

ASKER

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?
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
Avatar of Leo

ASKER

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?
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
Avatar of Leo

ASKER

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.....
yes, you should see the White space after 24 hours.

~ singh
Avatar of Leo

ASKER

Find script to run, and it worked.