Solved

Need to Defrag Exchange Database, but don't have hard drive space to run it on current server.

Posted on 2010-11-19
27
647 Views
Last Modified: 2012-08-14
Hello,

I'm planning to defrag the Exchange 2003 Database server this weekend and wanted to figure out what I can do since my drive space on this server is all used up and only have 1gig left.

If I move the database to another server and defrag the database there, how do I do that command wise.  Do I run the command from that server of the exchange server.  What what would the command be.

The Exchange Database is 55 gig's how long do you think this will take?

Any help would be greatly appreciated.

Thanks,

Nathan
0
Comment
Question by:PortN0X
  • 8
  • 7
  • 7
  • +4
27 Comments
 
LVL 31

Accepted Solution

by:
DrUltima earned 250 total points
Comment Utility
A 55GB EDB file will take quite a while to defrag.  And, I will warn you, you will only recover space if you have deleted sufficient users out of your DB.  Honestly, this action should only be done if absolutely necessary.  

You can use the /t switch on eseutil to set another location for your temp db and /f for the temp steaming file.  If you have no drive space available, I would probably attach a USB or eSATA hard drive to the server to give it the needed space.

This is the how to on defragmenting your Exchange DB.
http://support.microsoft.com/kb/328804

I still cannot stress enough that this should be a last case scenario.  It is not an operation you want to approach lightly.

Justin

0
 
LVL 12

Expert Comment

by:DarinTCH
Comment Utility
he's right
you'll be there all weekend
65gb took my 35+ hrs

don't move the DB if it can be avoided


ps have you looked for temp files and log files you can off load?
can you add more HD space?
can you find the user with the 10+ GB amount of files and help them archive
0
 
LVL 76

Assisted Solution

by:Alan Hardisty
Alan Hardisty earned 167 total points
Comment Utility
You can move the databases to another server to defragment / repair by reading the following article;

http://support.microsoft.com/kb/244525/

This is useful if the other server has loads more space

Eseutil runs at a speed of about 4-6 gb per hour, depending on hardware.
0
 

Author Comment

by:PortN0X
Comment Utility
Have you tried this on a USB Drive?  I have one hooked up but didn't know that this could be done.

So when your talking the /t switch on eseutil this creates a temp on save the USB or another server?
Would it work on a external usb drive?
0
 
LVL 31

Expert Comment

by:DrUltima
Comment Utility
I have done it on a USB drive once, and it is even slower than the times Alan suggests.  If you have another server with sufficient space, I would use his recommendation and run with that.

Yes, the /t switch tells the defrag utility what location you want to use for the temp db file.  Do to your low, low space, I would suggest an alternate location for the temp stream file, too.

Justin
0
 
LVL 76

Expert Comment

by:Alan Hardisty
Comment Utility
Yikes! USB - no wonder it was slow!

I guess you have to use whatever is available sometimes.
0
 
LVL 76

Expert Comment

by:Alan Hardisty
Comment Utility
If you can use a disk other than USB I would, but if you don't have a choice - it will work, just don't expect it to do anything quickly.

0
 
LVL 31

Assisted Solution

by:DrUltima
DrUltima earned 250 total points
Comment Utility
Alan,

Yeah, USB is obviously not my first choice.  A 10GB EDB took close to 20 hours.  It was the only option, though, as that client only had one server.

PortN0X,

USB will work in a pinch, but expect very, very slow processing.  For a 55GB EDB, I would not be surprised if it took close to 72 hours, maybe more.

Justin
0
 

Author Comment

by:PortN0X
Comment Utility
Currently the server has a RAID 5 with 3 33gb drives, the backplane has 6 spots.  So I could create another RAID 5 buy 3 new `146gb drives and then move the database over.  I just won't be able to get the drives in before mid next week.

I've requested each user to delete un-needed email.  One user have 5K emails in there deleted items so fare.  But ya I did request each user to clean up their mail boxes.

Darin when your talking the temp and log files where are those files located that your mentioning that can be off loaded and where could I off load those too.
0
 
LVL 31

Assisted Solution

by:DrUltima
DrUltima earned 250 total points
Comment Utility
I would not delete Exchange log files, as that can cause recovery issues, should the need arise.  

Users deleting mail will not reduce the size of your EDB file at all.  It will just store that spot in the DB as white space.  The ONLY way to reduce the size of an Exchange DB is an offline defrag.
0
 
LVL 16

Assisted Solution

by:Viral Rathod
Viral Rathod earned 83 total points
Comment Utility
I'm planning to defrag the Exchange 2003 Database server this weekend ?
--------------------------------------------------------------------------------------------------
1) First thing you need to look is if you really need a offline defrag ?
Check the Event Id 1221 on the Mailbox Store and Public Folder store to make sure sufficient white space is avilable on the database
White Space (Recyclable Space) indiactes how much space could be recovered by an offline defragmentation
2) If there are very large amount of mails has been deleted then make sure "Keep delted Items" on the server is set to 0 Days and you have run the Online Maintanance to generate white space before starting Offline Defrage.
3) Make sure you have taken the complete Backup of Both the Exchange Database
4)Exchange offline Defrage Require 110% of Free Space to Defrage Exchange Store ,
If Mailbox Store Database size is 60 GB then you need atleast 70 GB of free disk space on the server
(Check Event Id 1216 for Database Size)
5) Make sure you have taken sufficient Down time to run offline defrag on exchange database
(4GB of Database Defrage Require 1 Hour to Complete (60 GB of Database Require Approx 15 Hours)

Refer the Article for Offline Defrage
http://technet.microsoft.com/en-us/library/aa998863(EXCHG.80).aspx

Note : The Offline Defrage is really slow if you run on the USB drive ,also USB drive is not Recommended for Offline Defrage (SCSI OR SATA hard disk ) will be ok

If I move the database to another server and defrag the database there, how do I do that command wise. ?
--------------------------------------------------------------------------------------------------------------------------------------------
All you need to do is copy the 4 or 5 dll's mentioned in the KB to the non-exchange computer and run the eseutil commands.
Better still, just copy the entire bin folder to this other machine, if you don't wanna sift through those dlls and exe's. Change your directory to the bin folder and run any command u like with the eseutil.exe.
If you are planning to run offline defrag on a database with eseutil.exe, make sure you copy the bin folder or the dll files to a drive that has about 125% of the database size as free space on the disk.

Hope this helps,If anything is unclear, please feel free to let us know and we will be glad to help,Thanks.
0
 

Author Comment

by:PortN0X
Comment Utility
When I check the Event ID 1221 the events I find are all around 16,174MB.
0
 
LVL 76

Assisted Solution

by:Alan Hardisty
Alan Hardisty earned 167 total points
Comment Utility
Demazter wrote a great article about Offline Defrags and it can be read here:

http://www.experts-exchange.com/Software/Server_Software/Email_Servers/Exchange/A_2730-Exchange-Offline-Defrag.html

With 16,174Mb of free space - you can clear up 16Gb of white space.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:PortN0X
Comment Utility
Ok this is all great information.

QUESTION'S:

1.)  So if I run the t/ switch command I don't first need to copy that exchange database to another server.  And can leave it on the current and just have the temp be created on a different server?

2.) When running that command what is an example of the database route that it would be like.  Should I create a mapped drive and run it that way or ??
0
 

Author Comment

by:PortN0X
Comment Utility
So basically if I use the t/switch what is an example of the path that I'd use, and I guess lastly after that is finished do I copy that temp rename it and remove the old database.
0
 
LVL 76

Expert Comment

by:Alan Hardisty
Comment Utility
Yes to /t - it will write the temporary exchange database file to the location you specify.

Always a handy switch when you are low on space.

Yes to delete and copy the temp database too.
0
 
LVL 76

Expert Comment

by:Alan Hardisty
Comment Utility
You can use a mapped drive to another server if you can map a drive to it or map to a drive with more empty space than the database is sitting on.
0
 
LVL 13

Expert Comment

by:markusdamenous
Comment Utility
Map a network drive to the space on another server,

net use x: \\servername\folder

then

eseutil /d "c:\currentdb.edb" /t "x:\temp.edb"

you need to CD into the correct directory on the exchange server to run this,

c:\program files\exchsrvr\bin

0
 
LVL 31

Expert Comment

by:DrUltima
Comment Utility
If both servers and switch fabric supports Gig speeds, a mapped drive would be faster.  If not, in my experience, it operates at roughly the same speed as an attached USB drive.  Either are viable, but not the most desirable, options.

Justin
0
 
LVL 47

Expert Comment

by:dlethe
Comment Utility
I would get my hands on a small premium-quality SSD.  I've defragged similarly sized files, and you should have no problems getting it done in a few hours, tops.

Get something like an OCZ vertex pro-II for a few hundred dollars, and it will read/write approx 40,000 RANDOM I/Os per second.

Then after the defragging is done, I am sure you can find a home for a small SSD on that same system, or in your data center for such situations.

0
 
LVL 31

Expert Comment

by:DrUltima
Comment Utility
I would suggest an Answer was given, but it would be hard to separate out who gets what points.  alanhardisty and DrUltima gave the most information and dlethe also gave helpful info.  I would suggest awarding Alan the Answer and myself and dlethe an Assist, someone objects.  As far as which exact post to choose, almost all of them have good tidbits of information.

DrUltima
0
 

Author Comment

by:PortN0X
Comment Utility
Sorry for not getting the points alloted.  Will do now.

Been on vaca, and then forgot about this.

Thanks,

Nathan
0
 
LVL 31

Expert Comment

by:DrUltima
Comment Utility
Nathan,

Vacations happen to us all.  We understand.  Thank you for coming back to your Question.

DrUltima
0
 

Author Comment

by:PortN0X
Comment Utility
What I did was;
1.) Move database to another server, it took 16 hours to copy over.
2.) Ran defrag on database on other server, I did copy the whole bin folder instead of picking out certain files to copy over to run the defrag on the other server.
3.) Copied the database back over only took 8 hours on the copy back over.

** We gained ruffly 17gigs.

I did move the old database that was still on the exchange server to an external drive for a backup just in case the defrag database didn't work, instead of deleting the old.

Thanks for all the suggestions.
0
 
LVL 76

Expert Comment

by:Alan Hardisty
Comment Utility
Hope you had a nice vacation : )  Welcome back!
0
 

Author Closing Comment

by:PortN0X
Comment Utility
Had a lot of great ideas, links, thoughts from everyone.  I tried splitting up the point fairly and checked the boxes on each post that helped.

Also would note it was easier just coping the bin folder over then finding the certain files and coping them over.

Also to note the exchange defrag took about as many hours as the copy, although I currently don't remember the exact amount of time it took.

Also when I ran the copy I should of just let the process run and not keep checking it every 20 minutes or so and should of done something else(Watch a movie).  Cause that copy and then defrag took a while.

Thanks for all the help.
0

Featured Post

Want to promote your upcoming event?

Attending an event? Speaking at a conference? Or exhibiting at a tradeshow? Easily inform your contacts by using a promotional banner in your email signature. This will ensure your organization’s most important contacts are in the know.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
exchange 2 32
setting Target address in user Attribute 5 26
Hide External contact 13 26
What is this Task? 4 34
Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
how to add IIS SMTP to handle application/Scanner relays into office 365.

744 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

14 Experts available now in Live!

Get 1:1 Help Now