One of the first floods of warnings new SCOM admins often get in their inbox is Logical Disk Fragmentation is High.
Here is how it usually goes down:
1. You import the Microsoft Windows Server Management packs on Monday.
2. You spend a day or two tuning out the memory and CPU spikes that fall into a range that you would consider noise.
3. By the end of the week you are feeling pretty good about yourself and decide to setup some notification channels and subscriptions for some peace of mind over the weekend.
4. You wake up Saturday morning to find your inbox or console full of Disk Fragmentation warnings.
What have you done wrong? Nothing, it is just that by default the Windows Server MP runs its disk fragmentation check every Saturday at 3:00 AM so unless you preemptively made the necessary overrides to your environment you will be treated to this nice little surprise. Certainly not the end of the world, but here is where many admins screw up. SCOM offers the wonderful functionality of being able to fix the fragmentation problem with two clicks via the Logical Disk Defragmentation task.
You have fragmented disks, you can defrag them in two clicks, how is this not a good thing?
The first question you have to ask before even thinking about defraging a server via SCOM is if the fragmented server is virtual or physical.? If the server is physical the answer to if you should defrag is–maybe. If the server is virtual– the answer is no.
For a good explanation of the implications of defraging a virtual server I would recommend Cormac Hogan’s September 20, 2011 post on the VMware vSphere Blog.
The post is specific to why this is a really bad idea for VMware shops, but much of the reasoning is applicable to any virtualized server.
The key points that apply to any virtualized servers are that:
1. You are unlikely to see any benefits from defraging virtual disks since generally multiple VM’s run on any given datastore/storage pool in an enterprise environment.
2. If any of your disks are thin provisioned the defrag process will cause your VMDK/VHD to expand and to unnecessarily chew up space. (If you were to defrag a large number of thin provisioned servers at the same time you could theoretically cause an outage if any of your datastores/storage pools are oversubscribed.)
3. Defragging creates more I/O which could result in a temporary drop in performance for the duration of the defrag.