• jasona.work (8/23/2013)


    So, I'm looking at possibly setting up a job in Windows (although I may have to manually trigger it) to defrag the disks in my servers. For the old-hands though, who've probably dealt with similar situations, I've got a couple questions, and haven't found satisfactory answers yet...

    1. Will the built-in Windows Defrag (Server 2008 / 2008 R2) defrag the MDF / LDF files without me stopping SQL Server?

    2. Is it even worth the effort to defrag considering all my servers are virtual (VMWare) and the VMWare storage is all on SAN?

    I'm inclined to think the answer to #2 will render the answer to #1 irrelevant. I just ran the "Analyze disk" against one of my QA boxes data volumes, and it reported only 2% fragmentation, so I suspect that thanks to being virtual, there isn't really much fragmentation...

    Thanks,

    Jason

    I would stay away of defrag the SAN with the built-in Windows Defrag, specially if your SQL boxes are virtual, and you do not have physical mdf or ldf files there. But, if you do it, expect several hours of slow and intensive disk operations, depending of how big your LUN is. And I would shutdown everything that is using that LUN anyway.

    Fragmentation on virtual machines is different than on a real machine. If you are using VMware, I would use the VMware defrag tools instead. VMware workstation provides that capability. I would be surprised if VMware Server or VSphere does not.

    May I ask you a question? why so interested on defrag the actual LUNs? Do you have any evidence that is causing a problem?