Solved

Defrag hard disk on Exchange Server

Posted on 2003-10-21
18
517 Views
Last Modified: 2008-02-01
Exchange 2000 SP3, Post SP3 Roll-up
Windows 2000 Server SP4

I noticed that our backup was running longer and longer each night. Even after removing over 5gigs of data and then running the offline defrag of the database.

I then analyzed the hard disk using diskkeeper and noticed the the drive was 68% fragmented. It was bad. Now the way I have this set up is RAID1 for the system and RAID5 for the database and logs. The system drive was just as bad.

I tried to run the defrag a couple times during somewhat non-peak times and it went through ok but its still badly fragmented. Now I ran it this morning during a peak time (not so smart) and it caused mail to stop. I the queue was backed up pretty bad. Long story short I had to reboot with SMTP set to manual and then delete all mail from the \queue directory and restart SMTP and it was fine.

My question is, is it possible to schedule and run a defrag on the hard disks while the Exchange services are running? How does everyone ensure the hard disks are not getting to badly fragmented?

It seems with the logs and mail constantly being written and removed from the disk this is going to happen frequenly.
0
Comment
Question by:mmurfmis
  • 8
  • 7
  • 3
18 Comments
 
LVL 4

Expert Comment

by:subsoniq
ID: 9593516
I never run file system defrags on production exchange servers, it impacts performance too much.  If you insist on running file syste defrags I would recomend dismounting your databases and stopping the exchange services, the defrag will probably run faster.  Of course, this is an outage for your users so you don't want to do this very often.  Are you running anything other than exchange on this server?
0
 

Author Comment

by:mmurfmis
ID: 9593688
Yeah this is running Sybari Antigen for virus and SPAM.  Have you ever checked to see how badly you Exchange server is fragmented? It is really bad. I might just do it during off hours and dismount and stop services but is this needed?
0
 
LVL 8

Expert Comment

by:JasonBigham
ID: 9593940
I wouldn't do it either, but it's your box.

0
 
LVL 4

Expert Comment

by:subsoniq
ID: 9593966
Yes, I have checked, and they aren't that bad, even after running for several years.  This may be an indication of something wrong with your server.
0
 

Author Comment

by:mmurfmis
ID: 9593990
I understand the concerns, but this is causing performance issues with the backup and the server. Analyze your server and tell me how bad your drive is where the database and logs are. I would think this has to be done at some point. 68% fragmented seems pretty bad to me for a server that just under a year in production.

So no one defrags there Exchange server?
0
 

Author Comment

by:mmurfmis
ID: 9594023
What would be wrong with the server? This to me would be normal for a hard disk to become fragmented on a server with tons of read/writes as Exchange does. Are your logs and database seperated on two different disks?
Could that be the problem? Even so, there would still be read/writes on the drive with the logs.
0
 
LVL 4

Expert Comment

by:subsoniq
ID: 9594024
On my home e2k server I keep databases on a seperate volume, and it is only 7% fragmented.  My sysvol partition that has all the logs is only 27% fragmented, and I've never defragged it since I built it 2 1/2 years ago.  I back this server up to AIT tape nightly, both exchange online backup and the file system, and have not seen any problems with backups taking longer.
0
 
LVL 8

Expert Comment

by:JasonBigham
ID: 9594041
The db's are defragged every night... anything else doesn't concern me.

5.5 ran for years without a defrag... in fact, NT4 server doesn't even come with it if memory serves (might be mixing up my utilities)

Fragmentation seems normal to me considering it's a mail server.... guess it never concerned me
0
 
LVL 4

Expert Comment

by:subsoniq
ID: 9594050
While exchnage does a lot of read/write operations it does them in a limited fashion as far as number of files are concerned, and it's in a regular fashion.  the biggest culprit would be log files as fragmentation will occur over the years as log files are removed from the server after an online backup, but as I said before it would take a VERY LONG time to get to the condition you're at.  As for what could be wrong, I have no idea, that will take quite a lot of troubleshooting.  Maybe it's a hardware problem, or an OS problem.  Maybe your machine is infected with something that's doing a lot of file creation and deletion.
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:mmurfmis
ID: 9594052
I also backup at night via online. The logs are cleared. Now how many users do you have? This is a server with over 1000 users. The database is over 16gigs. There are constantly people coming and going so accounts and mail are always being created and removed.

Like I said I have run the offline defrag to compress the database.
0
 
LVL 4

Expert Comment

by:subsoniq
ID: 9594078
Well, beats my home server, I'm the only user although I have 7 mailboxes.  Still, I was the head messaging systems engineer for an MSP that had servers with thousands of users and it was never a problem for us.
0
 

Author Comment

by:mmurfmis
ID: 9594095
I also had no problems with NT4 or Exchange 5.5 at all. We just ordered 20 copies of diskeeper because of the backup issues on different servers. Put it this way we had a server which was taking over 3hours to backup. We analyzed the disk and found it was badly fragmented. The defrag wouldn't even work in suffient amount of time. So we backed up the data and formatted the drive and restored it so there was no fragmentation and now the backup runs great. I have to think this is now the case on the Exchange server,
0
 
LVL 4

Expert Comment

by:subsoniq
ID: 9594114
We had 4 exchange 2000 mailbox servers, each with 16 mailbox stores that would get up to 25 gigs in size (each store, not total), running for close to 2 years.  we did not see this kind of problem.
0
 
LVL 4

Expert Comment

by:subsoniq
ID: 9594121
one thing though, we had 3 drive volumes for each server.  c:\ was the sysvol that had the OS and exchange installation, e:\ was for transaction logs, and f:\ was for databases.  we put the page file on e:\.
0
 

Author Comment

by:mmurfmis
ID: 9594154
Did you handle the backups of the server? This is slowly over time taking longer and longer. The backup used to take about 1hour and a half with 20gig a couple of months ago. Now I have cleaned it up to 16gig and its takes over 3hours. Slowly getting longer. With a drive 68% fragmented the read\writes have to take a very long time to complete as with a backup. Right?
0
 

Author Comment

by:mmurfmis
ID: 9594162
Thats what I am thinking. I need to seperate the log files from the database and OS.
0
 
LVL 8

Accepted Solution

by:
JasonBigham earned 125 total points
ID: 9594175
Definately move the logs back to the raid1, leave the db's on raid5... this is well documented for performance issues.
0
 
LVL 4

Assisted Solution

by:subsoniq
subsoniq earned 125 total points
ID: 9594181
I was involved but I wasn't the primary engineer responsible for backups.  We'd backup around 250-300 gigs of exchange data in 4-5 hours, but we had extremely expensive equipment, the kind that costs millions of dollars (we backed up 4 terabytes of enterprise data a night).  What backup software/hardware are you using?
0

Featured Post

Too many email signature changes to deal with?

Are you constantly being asked to update your organization's email signatures? Do they take up too much of your time? Wouldn't you love to be able to manage all signatures from one central location, easily design them and deploy them quickly to users. Well, you can!

Join & Write a Comment

Resolve Outlook connectivity issues after moving mailbox to new Exchange 2016 server
Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
To show how to create a transport rule 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 >> Rules tab.:  To cr…
To show how to generate a certificate request 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 Servers >> Certificates…

708 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

11 Experts available now in Live!

Get 1:1 Help Now