With the release of our Master Storage Spaces Direct book on Amazon we have been getting a lot of requests to help people setup some test labs.

Storage Spaces Direct does require some specific hardware to get going and today we had one such case.

We wanted to use some existing Dell R620 hardware to play with Storage Spaces Direct S2D in the lab.

We put in 2 x SSD Drives for the Cache (Journal) and 4 x SATA Drives for the Storage Pool

So, we actually followed the configuration that we had laid out in Chapter #5 in the book and ran into the following issue:

MediaType = Unspecified

Now the tricky part is that in order to change the media type you actually need to enable S2D first and create a storage pool.

 

When we tried to run Enable-StorageSpacesDirect we received the following errors:


We decided to skip the auto configuration by running:



Enable-ClusterStorageSpacesDirect-SkipEligibilityChecks -Autoconfig:$false -PoolFriendlyName S2DPool




The problem now was that Storage Spaces Direct couldn’t find a suitable drive for Cache because the SSD drives were still configured as Unspecified Media Type.

In order to change this, we needed to create a Storage Pool and then Change the Media Type Values.


Get-StorageSubSystem *cluster* | New-StoragePool -FriendlyName S2DPool -WriteCacheSizeDefault 0 -ProvisioningTypeDefault Fixed –ResiliencySettingNameDefault Mirror -PhysicalDisks (Get-PhysicalDisk | ? CanPool -EQ $true)
Get-Physicaldisk | where size –eq 999653638144| Set-PhysicalDisk –MediaType HDD
Get-Physicaldisk | where size –eq 524522881024| Set-PhysicalDisk –MediaType SSD
Get-Storagepool S2DPool | Get-PhysicalDisk | ? MediaType -EQ SSD | Set-PhysicalDisk -Usage Journal

However, when we ran Get-ClusterStorageSpacesDirect we saw this:

 


We have tested with this configuration in the past and performance is very bad on our S2D Cluster without the Cache.

The only way I have figured out to work around this issue was as follows:

  1. Create the Failover Cluster
  2. Enable Storage Spaces Direct with Cache Disabled and AutoConfig Off
  3. Create a new Storage Pool
  4. Fix the Media Types
  5. Manually Turn back on Caching

Here is the PowerShell script that we used to build this base cluster for the testing lab today:



New-Cluster -Name S2DCluster -Node sh-va-r4,sh-va-r5 -NoStorage -StaticAddress 192.168.110.99 
Enable-ClusterStorageSpacesDirect -SkipEligibilityChecks -Autoconfig:0 -confirm:$false -PoolFriendlyName S2DPool -CacheState Disabled -verbose
Get-StorageSubSystem *cluster* | New-StoragePool -FriendlyName S2DPool -WriteCacheSizeDefault 0 -ProvisioningTypeDefault Fixed -ResiliencySettingNameDefault Mirror -PhysicalDisks (Get-PhysicalDisk | ? CanPool -EQ $true)
Get-Physicaldisk | where size –eq 999653638144| Set-PhysicalDisk –MediaType HDD
Get-Physicaldisk | where size –eq 524522881024| Set-PhysicalDisk –MediaType SSD 
Get-Storagepool S2DPool | Get-PhysicalDisk | ? MediaType -EQ SSD | Set-PhysicalDisk -Usage Journal 
Get-PhysicalDisk | Sort-Object FriendlyName | ft FriendlyName,HealthStatus,Size,BusType,MediaType,usage
Get-ClusterStorageSpacesDirect
(Get-Cluster).S2DCacheDesiredState = 2
Get-PhysicalDisk | Sort-Object FriendlyName | ft FriendlyName,HealthStatus,Size,BusType,MediaType,usage
New-Volume -StoragePoolFriendlyName S2DPool -FriendlyName Volume1 -PhysicalDiskRedundancy 1 -FileSystem CSVFS_ReFS -Size 500GB 
New-Volume -StoragePoolFriendlyName S2DPool -FriendlyName Volume2 -PhysicalDiskRedundancy 1 -FileSystem CSVFS_ReFS -Size 500GB
Get-ClusterStorageSpacesDirect

As you can see after we did this the Caching Error and the Unspecified Media Type Errors were fixed.


Hope you enjoy


Super Cristal