?
Solved

Exchange Mailbox Defragmentation

Posted on 2010-09-14
30
Medium Priority
?
561 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
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
 
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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
Suggested Courses

719 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