Is it safe to run Windows Defragmentation (Defrag) tool on an Exchange server?

I noticed that the D drive on an exchange server was very defragmented (using the inbuilt standard Windows defragmentation tool). When I pressed analyse it showed a big block of red.

I thought I better check before running in case the defrag could cause some damage to exchange and reading around I am not sure I should actually risk running it.

I've determined there are three types of defrag related to Exchange.

Standard normal defrag- the tool we all know and love.
Online defrag - something that exchange does automatically daily I believe.
Offline defrag - run with caution and only when necessary. Requires downtime and risk associated.

I just want to run a simple defrag but even reading about this I'm have read that I should dismount the stores first (Something I'm not 100% sure how to do) and also I should just not bother risk running in on the drive where the exchange data is stored (which is the drive I want to defrag).

Can I get some expert opinions?

Who is Participating?
JohnGerhardtConnect With a Mentor Commented:
JohnGerhardtConnect With a Mentor Commented:
It is safe to do it..
but whether or not it woudl be worth it is another matter..
tigermattConnect With a Mentor Commented:


When it comes to Exchange, you can indeed run various types of defrag. The standard Windows tool will defragment the whole drive, whereas if you run an Exchange Offline Defragmentation, you will compact the store (reducing any excess whitespace which may be contained within it). Generally, the Exchange databases look after themselves through Online Defragmentation every day, so it is not necessary to defragment the Exchange databases regularly. In fact, I have only ever done it at one of my clients, where they have a large number of mailboxes being created and deleted, and build up a large amount of whitespace as a result.

If you want to defragment the Exchange Server's entire D: volume, there is no harm in doing this, but it is a good idea to dis-mount the Exchange databases before beginning the procedure. Failure to dis-mount the stores can result in poor disk I/O, preventing Exchange accessing the databases in a timely manner. There are some horror stories out there about if you don't dis-mount the stores, there is the potential for corruption in the Exchange databases during the defrag; it's unlikely, but a potential risk which can be avoided.

To dis-mount the stores, you have two options. The easiest is simply to Stop the 'Microsoft Exchange Information Store' service in the Control Panel, Administrative Tools, Services applet. This will instantly dis-mount all stores on the server. Alternatively, you can open Exchange System Manager, drill down to your server, it's storage group(s) and then right-click each store and choose 'Dismount Store'. Either way will work, but I like stopping the service since it does all the stores in one go. You can then start the defrag using the defragmentation tool. Once it is complete, re-mount the stores either by starting the Information Store service again, or by right-clicking each store in System Manager and choosing 'Mount Store'.

Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

afflik1923Author Commented:
Net result of reading the second article is that I should not do it is the impression I get. Unless I can move the exchange stores somewhere else first.

Don't you think the same after readin the second article you posted.
Also am I right in thinking that "file system defragmentation" is the same as a Windows standard defrag tool?

afflik1923Author Commented:
When I said the second article I was referrig to:

Do you store anything else other than Exchange databases on the D: drive of that server? If you do, you will definitely benefit from running a file system defrag (yes, using the Windows standard dfrg.msc tool). You just need to dismount the stores before you begin, and provided the stores are dismounted there is very little loss to the data in the Exchange databases. Of course, whenever you defrag, there is the potential for data loss - if the power failed for example - but you should always have a good backup before defragmenting anyway.

If you just store the Exchange databases on the D: volume, and no transaction logs or other files, you may benefit from an Exchange Offline Defrag with eseutil /d, but as mentioned in the article a file system defrag is probably not necessary.

TYou are right the FS defrag is windows defrag.. And it is correct that the defrag its self wont do any harm.. But running it on an active server will probably affect the performance adversly...
afflik1923Author Commented:
Useful information. Despite everything I decided not to, or at least wait until I have time to sort things out should anything go wrong.
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.

All Courses

From novice to tech pro — start learning today.