All Articles

Shared VHDX on Storage Spaces

I have recently been implementing Windows Azure Pack at a large hoster here in Denmark. To my luck they were interested in not only WAP, which is a challenge itself, but also Storage Spaces. When considering what an awesome product Storage Spaces is, there are suprisingly few articels on it on the world wide web, and even less conserning using Shared VHDX on Storage Spaces. When designing Storage Spaces we have all heard we must pay especial attention to Columns and Interleave, but i had never heard of Logical Sector Size being something you should keep in mind. The story begins with harddrive manufactures wanting to increase the sizes of disks, and one way to get a more dense disk is to increase Block Sector Size from 512b which had been the standard since its inception in 1956, to 4096b (4K) in the late 00’s. To this date alot of drives are still shipped with a 512b sector size, the exception being SSD’s. Since they were largly adapted since the move to 4K, they use that. Running a 4K disk shouldn’t be an issue, Microsoft has an article describing support and initially nothing sticks out. Until you want to provision a server with a Shared VHDX and you get this when you try to initialize the disk

The request could not be performed because of an I/O device error

Apparently Shared VHDX’s do not support 4K block sector size. Luckily the fix is easy, delete and recreate the Storage Pool! I hope you didnt get in to deep before you discovered this. To create a Storage Pool with a sector size with 512b you need to include

–LogicalSectorSizeDefault 512

in your powershell command. In my use case i wanted to create one big Storage Pool including all my disks, first i needed to determine the name of my StorageSubSystem with

PS> Get-StorageSubSystem

FriendlyName                            HealthStatus               OperationalStatus
------------                             ------------               -----------------
Storage Spaces on stsofs01                 Healthy                         OK
Clustered Storage Spaces on sofscl01       Healthy                         OK

Naturally i want to use the Clusted Storage Space. Next you need to contruct a variable with all the disks you want in the Storage Pool. In my case this was easy, i wanted all disks available to me.

Get-PhysicalDisk -CanPool $true

When you put this together i will look something like this.

New-StoragePool -StorageSubSystemFriendlyName "Clustered Storage Spaces on sofscl01" -FriendlyName StoragePool01 -PhysicalDisks {Get-PhysicalDisk -CanPool $true} -LogicalSectorSizeDefault 512

and now you have a Storage Pool that supports Shared VHDX, and supposedly with better performance. Stay tuned for more Storage Spaces goodies. Credits https://social.technet.microsoft.com/Forums/en-US/38f2739d-6d67-4c5b-8743-936b9e9d2702/shared-vhd-on-sofs-cannot-initialize-in-guests?forum=winserverfiles http://support2.microsoft.com/kb/2510009/en-us http://jeffgraves.me/2014/06/03/ssds-on-storage-spaces-are-killing-your-vms-performance/

Published 11 Mar 2015