Hyper-V and Disk Fragmentation

There are 3 type of disk fragmentation you might need to deal with in regards to Hyper-V:

  1. Fragmentation of the file system on the host LUN where the VMs reside.
  2. Fragmentation of files system on the LUNs inside of the VM.
  3. Block fragmentation of the VHDX itself. This is potentially more of an issue with dynamic disks and differencing disks.

We deal with the first type by defragmenting the LUN, which might be a CSV, in which case you can take a look here for more information on this Defragmenting your CSV Windows 2012 R2 Style with Raxco Perfect Disk 13 SP2.  For more information on fragmentation in general take a look here What’s New in Defrag for Windows Server 2012/2012R. The second type is business as usual and is similar to the first one except that it’s the file system inside a VM.

For the third type we need to create a new virtual disk using the fragmented one as the source. See Checking and Correcting Virtual Hard Disk Fragmentation. This easily done but it does cause down time unless you leverage storage live migration. So that’s my preferred method, especially as I leverage ODX when I do this, so it’s pretty fast. So always leave yourself some margin on storage to be able to perform maintenance operations. That has always been true and still is.

But how do you find out that you have this issue? PowerShell is your friend! Here’s a snippet to show you can check all VMs their vhdx files on a cluster:

$AllVMsOnAllNodesInCluster = Get-VM -ComputerName (get-ClusterNode)
ForEach ($VM in $AllVMsOnAllNodesIncluster)
{
    $VM.Name
    #$HardDrives  = $VM.HardDrives
    invoke-command -ComputerName $VM.computername -ScriptBlock {
        param ($VM)
        Get-VM -Name $VM.Name | Get-VMHardDiskDrive | Get-VHD | ft path, fragmentationpercentage -AutoSize
    } -arg $VM
}

Here’s a screenshot of some output of this snippet

image

As said the best solution that does not incur down time is to storage (live) migrate the virtual disks affected. We can automate this and put in some logic to do this for all virtual hard disks that are more than X% fragmented. Do take care to also check for disk space or the migration will fail.

Hope this helps some of you!

Hyper-V Amigo Chat Ignite 2015

Many MVP’s attended Microsoft Ignite 2015 in Chicago to see what our future will look like.

Hyper-V Amigo Chat Microsoft Ignite 2015 Thumb 1 (2)

Carsten published the “Hyper-V Amigo Chat” we did right after Ignite. The conference was a blast for us all. Tired but happy we chat about storage space direct, Nano Server, ReFS, Dedupe, Azure Stack, … Enjoy!

Here’s the link to the video Hyper V Amigos Chat – Microsoft Ignite 2015 on Carsten’s blog.

For Whom The Bell Tolls At Microsoft Ignite 2015

Microsoft sure knows how to keep the pressure on the storage industry. Both the traditional and the hyper converged crowd now have heard the gloomy tolling of that big doomsday bell once again. The offerings for 3rd party storage in the Wintel ecosystem will have to become better value for money once again in order to keep up or stay ahead.

clip_image001

I already wrote that here in TechEd 2013 Revelations for Storage Vendors as the Future of Storage lies With Windows 2012 R2 and poked some fun that the days of the easy big money in storage were over. Today storage vendors that do not adapt are going to feel that more than ever. One thing is for sure, there is no one size fits all and one trick ponies are not going to thrive.  Microsoft now covers hyper converged, converged and centralized storage solutions. SMB Direct is the backbone for high throughput, low latency transport. If you haven’t done so you might just take a peek at SMB Direct now and study up on DCB (PFC/ETS). No worries … I have done a lot of “pioneer” work in the field on this. But unfortunately I could not present an end-to-end configuration of SMB Direct over RoCE session here at Ignite. But there are other opportunities.Storage replication completes the story while Storage QoS is giving is long needed control. So let the FUD fly, sit back and enjoy the show. Remember, when you’re catching lots of FLAK, you’re over your target Winking smile

Handy DELL Storage Tool: Dell Virtual rack

If you need to see and find information on DELL storage fast they have a nice page on line with a virtual rack where you can look at the components of their various storage offerings.

image

They update it regularly and it’s a fast and easy way to get started. Naturally you’ll need to dive in a bit deeper or get some help to work out the last details. I’m like the Compellent as I have found it to be the best possible traditional storage solution for a Windows Server 2012 R2 Hyper-V environment and great value for money. I hope they can find a way to keep delivering that same value in the coming years in an ever changing storage landscape.