Solved

Exchange Mailbox Defragmentation

Posted on 2010-09-14
30
546 Views
Last Modified: 2012-05-10
Hi,
I would like to do exchange mailbox defragmentation in my Exchange2003 server.Exchange 2k3 is installed in the windows2k3 server which is the domaincontroller.
Question1:what precautions i need to take before proceeding with the defragmentation.
Question2: command to do the defragment by giving a different path for the temp folder.(as my existing server does not have enough space to do the defragment process)
Question3: can i use an External harddrive in the same server to have the defragment temp folder,is that reliable ?
Please note,as my mailbox space is showing almost 90gb,i have deleted 10% of the overall mailboxes but still the size isnot reduced.
ExchangeLog from Event viewer :
The database "First Storage Group\Public Folder Store (EXCHSRV)"
 has 4 megabytes of free space  after online defragmentation has terminated.

The database "First Storage Group\Mailbox Store (EXCHSRV)"
has 18599 megabytes of free space after online defragmentation has terminated.


Please suggest with best option for this scenario.

Regards
Giri
0
Comment
Question by:sgiri
  • 8
  • 6
  • 6
  • +2
30 Comments
 
LVL 32

Expert Comment

by:endital1097
ID: 33671460
1. always good to have a full backup before running
2. eseutil /d c:\path\priv.edb /t"E:\some folder\temp.edb"
3. yes

mailbox store has 18gb and can run
0
 
LVL 13

Expert Comment

by:nfmartins
ID: 33671481
Hi,
Question 1

BACKUPS ;)

question 2
Example : ESEUTIL.EXE" -d "E:\Program Files\Exchsrvr\MDBData\priv1.edb" /t e:\temp.edb

the switch /t defines were u gonna put the temp file

Question3
That is not the best option, but if you dont have better choise its a solution i already done it serval times to external hard drives .

Hope this can help u

Best regards
NM
0
 
LVL 13

Expert Comment

by:nfmartins
ID: 33671499
the last part of the question i didnt saw it . sorry.

What u see in the event viewer are the space that u can gain if you run the defrag.
But exchange call that space "Blank spaces" basicly it will use that space before he starts using more phisical space on the server .
0
 
LVL 2

Expert Comment

by:sibisteanu
ID: 33671537
The online defragmentation(automatic) only free space in the database. The offline defragmentation (eseutil) makes a small database but is risky.
I recommend the offline defragmentation only if you need space on the partition.
I use another way to free space on the partition. Create a new database, move the mailbox to the new database, delete the old database. A non risky solution.
0
 
LVL 49

Expert Comment

by:Akhater
ID: 33671905
You best option is NOT TO DEFRAG
there is no need to defrag unless you are running really low on space and, if you are, you are much better off creating a new database and move the mailboxes to it.

Starting Exchange 2003 SP2 offline degrag is useless


Of course this is not a solution for you unless you have enterprise edition of exchange 2007
0
 
LVL 32

Expert Comment

by:endital1097
ID: 33671981
@akhater had a typo :)
Of course this is not a solution for you unless you have enterprise edition OR exchange 2007
0
 

Author Comment

by:sgiri
ID: 33672007
Hi sibisteanu,
As suggested by you,i would like to test by creating a new exchange database and move some mailbox for testing purpose,if this works fine can i delete the old database ?

Kindly send me some info about creating exchange database and moving mailboxes.

Thanks
0
 
LVL 32

Expert Comment

by:endital1097
ID: 33672027
you can only do this if your version of exchange is enterprise edition
just right click on the storage group and select new mailbox store
0
 
LVL 49

Expert Comment

by:Akhater
ID: 33672032
@endital1097 perfectly right I meant to say

Exchange 2003 Enterprise OR 2007

do you have exchange 2003 Enterprise ?

if so just right click create a new storage group and then create a new maiblox database in it  with the correct location
0
 
LVL 2

Expert Comment

by:sibisteanu
ID: 33672219
With the database of 90 GB I suppose that you have enterprise. It is correct?
0
 

Author Comment

by:sgiri
ID: 33672489
No i have exchange2003 standard installed.
0
 
LVL 32

Expert Comment

by:endital1097
ID: 33672512
then you cannot add another database
did you enable your maxium database size to 75gb?
are you trying to get below that so the database stays online?
0
 
LVL 2

Expert Comment

by:sibisteanu
ID: 33672638
If it is standard edition my solution doesn’t work.
The solution to keep database under control is to set quota for every user.
0
 
LVL 13

Expert Comment

by:nfmartins
ID: 33673387
sgirl.
Defrg the DB is better and its safe because it will only change the production DB if the defrag occurs without any problem.

NM
0
 
LVL 49

Expert Comment

by:Akhater
ID: 33677137
Defraging the DB is USELESS can you please tell us why you want to defrag ?
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 13

Expert Comment

by:nfmartins
ID: 33678207
@Akharter is useless?
how do u free up disk space?
for example if u freeup alot of space in db for example if u implemented a archive mail solution ...

Defraging a DB in offlene mode is one of the admin tools u have to mantaine your db.
0
 

Author Comment

by:sgiri
ID: 33679368
While doing defragment if something goes wrong or if the defrag stops in between.

If i have the backup copy of the exchange database,System state data of the DC,will that help me in keep my exchange as normal?

Regards

Giri
0
 
LVL 49

Expert Comment

by:Akhater
ID: 33679466
@sigri the defrag is SAFE while defraging eseutil will NOT touch the original file so, if anything goes wrong, your database will be intact you don't have to worry about that part

however to defrag you need
1. 110% of free space then the size of the DB
2. all your users will be down for an extensive amount of time

@nfmartins Yes it is useless unless your hard drive is running out of space (i mean like just a few GB available) starting exchange 2003 SP2 the white space are not counted towards the quota and why would I need to free up disk space ? after cleaning the EDB file will still be big but won't increase in size till all that white space is used again.

0
 

Author Comment

by:sgiri
ID: 33679693
Yes Akhater,
I have only 60% of free space than the DB size.

Hence i am planning to do the defragment using a different path for the temp directory.


With regards to your 2nd point,I can make the mailserver down for 24 hours,do you think defragmenting a database size of 90gb will take more than 24hours.

Please note,as i have deleted some unwanted mailboxes,my actual database size after the successfull defragmentation will be approx 60gb,this is my assumption.

Please advise.

Regards Giri
0
 
LVL 2

Expert Comment

by:sibisteanu
ID: 33679901
Yes. The database will be unmounted while the defragment runs. This may take a lot of time and in this time the database is offline.
The space inside the database is already free. Make offline defragmentation only if you need space on the partition for another programs.
If you decide to make the defragmentation first you need to check the database for error: ISINTEG and make a full back-up. If the database has errors inside many things can happen.
Personal I do not recommend the offline defragmentation.
0
 

Author Comment

by:sgiri
ID: 33680385
I donot require space in the partition,as i already have 60gb of free space.I thought the database may create problem if it exeeds the limit.

regards

Giri
0
 
LVL 2

Expert Comment

by:sibisteanu
ID: 33680497
If you have free space in the database, the database will not grow anymore until this space is filling with new e-mail data. To keep control on the dimension of the database read how to implement quota for the mailbox.
0
 

Author Comment

by:sgiri
ID: 33680729
ExchangeLog from Event viewer :
The database "First Storage Group\Public Folder Store (EXCHSRV)"
 has 4 megabytes of free space  after online defragmentation has terminated.

The database "First Storage Group\Mailbox Store (EXCHSRV)"
has 18599 megabytes of free space after online defragmentation has terminated.

Please let me know if i have enough database size.

Regards

Giri
0
 
LVL 32

Expert Comment

by:endital1097
ID: 33680743
You need 110% free space for db size
100gb db = 110 gb free
0
 
LVL 49

Expert Comment

by:Akhater
ID: 33681568
@sgiri

since you still have about 60% of free space you wont gain anything with the defrag,

1. the empty space in the DB will not count towards the quota (prove is that your file is 90GB and your limit is 75GB)
2. your file will now not grow bigger unless you use all the empty space inside of it



all that being said if you still wanna defrag and you have a temp storage with enough disk space then the operation is safe nothing to worry about.

Regarding the time 24 hours should be ok for 60GB
0
 

Author Comment

by:sgiri
ID: 33681634
Hi endital1097,

I am not asking for the freespace to do the defragmentation.
In my Exchange logs,it shows freespace of approx18gb,I would like to know that Do my database has 18gb available space as of now?
In that case i can give mailbox quato and forget about defragmenting the exchange database.

please find below my exchange Logs.

"
The database "First Storage Group\Public Folder Store (EXCHSRV)"
 has 4 megabytes of free space  after online defragmentation has terminated.

The database "First Storage Group\Mailbox Store (EXCHSRV)"
has 18599 megabytes of free space after online defragmentation has terminated. "

Regards

GiriPrasad.S.
0
 
LVL 32

Expert Comment

by:endital1097
ID: 33681661
yes, exchange will write to the freespace
0
 
LVL 49

Accepted Solution

by:
Akhater earned 500 total points
ID: 33681682
@sgiri did you read my previous post ?
just in case you did not here it is again



since you still have about 60% of free space you wont gain anything with the defrag,

1. the empty space in the DB will not count towards the quota (prove is that your file is 90GB and your limit is 75GB)
2. your file will now not grow bigger unless you use all the empty space inside of it



all that being said if you still wanna defrag and you have a temp storage with enough disk space then the operation is safe nothing to worry about.

Regarding the time 24 hours should be ok for 60GB

0
 

Author Closing Comment

by:sgiri
ID: 33681731
Thanks Akhater
0
 
LVL 13

Expert Comment

by:nfmartins
ID: 33687927
sgirl not fair but ok ..... u decide ...
0

Featured Post

Too many email signature updates to deal with?

Do you feel like you are taking up all of your time constantly visiting users’ desks to make changes to email signatures? Wish you could manage all signatures from one central location, easily design them and deploy them quickly to users? Well, there is an easy way!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Group policy not applying 5 28
change a Photo on Exchange 3 28
Intunes without company portal 3 39
change EXCH2013 protocol 5 7
We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
Easy CSR creation in Exchange 2007,2010 and 2013
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

705 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

18 Experts available now in Live!

Get 1:1 Help Now