Working with MS Storage Spaces
MS Storage pool is great but there are some culprits to be aware of.
You want to align your “Interleave” parameter with your NTFS Allocation Unit Size (AUS)
-this is to get the most I/O out of your pool
Remember this golden rule for parity virtual disks:
$ntfs_aus = ($number_of_columns – 1) * $interleave
And this rule for mirror virtual disks:
$ntfs_aus = $number_of_columns * $interleave
What does this mean? well, it means that you need to make sure that the AUS on your NTFS partition is dividable by your Interleave value
If you are only using the GUI, you cannot access these settings, so you need to use powershell.
So, first out if you have an old Pool that you need to delete:
Get-StoragePool –FriendlyName “Pool01” | Set-StoragePool –IsReadOnly $false Get-StoragePool –FriendlyName “POOL01” | Remove-StoragePool
Then you can create your Pool by using the GUI.
Then create your Virtual disk. The following will work for a mirror with Storage Tiering:
New-VirtualDisk -StoragePoolFriendlyName Pool1 -ProvisioningType Fixed –StorageTiers $SSD, $HDD -StorageTierSizes 2.5TB, 6.5TB -Interleave 16KB -FriendlyName "FastMirror" -ResiliencySettingName Mirror -NumberOfColumns 4 New-StorageTier -StoragePoolFriendlyName "Pool1" -FriendlyName "FastMirror_Tier_HDD" -MediaType HDD New-StorageTier -StoragePoolFriendlyName "Pool1" -FriendlyName "FastMirror_Tier_SSD" -MediaType SSD
Notice that this creates a Mirror without Parity.
Notice that the Number of Columns is 4 and the Interleave is 16KB
If we define this, the OS will write 4*16KB chunks across the disks, so your NTFS Volume should be partitioned with 64KB Allocation unit Size.
-remember the rule for mirrors above: 4×16=64KB
This way your reading and writing to the Vdisk will be aligned with the NTFS partition table and your machine won’t have to calculate every chunk, slowing your I/O down CONSIDERABLY!
Every Write to the underlying partition will be in 64KB chunks, which is considered very well suited for VHDX files (Hyper-V)
If you only have two disks in your pool and want to create a mirror, you can only have one column.
The Interleave setting on this one column can then be set to 64KB, and the AUS to 64KB.
The Powershell command for this would be something like this:
New-VirtualDisk -StoragePoolFriendlyName "Pool1" -ProvisioningType Fixed -Interleave 64KB -FriendlyName "Fast_mirror_noparity" -Size 1TB -ResiliencySettingName Mirror -NumberOfColumns 1
And whats with the Tiering you say?
Well, Tiering lets you PIN certain data to a faster Tier, for taking advantage of faster disks.
For Tiering to work the vdisk must be “fixed” and the partition filesystem must be NTFS.(not ReFS)
Also Storage tiers are only supported with mirroring or simple spaces.
The Tiering above is looking at two vaules: SSD and HDD
To how to PIN a file to your faster SSD Tier:
$VD = Get-VirtualDisk -FriendlyName "FastMirror" Set-FileStorageTier -FilePath "D:\test.exe" -DesiredStorageTier ($VD | Get-StorageTier -MediaType SSD)
And how to check the Tiering Pinning status:
Get-FileStorageTier -VolumeDriveLetter D | FL
If it’s only partially on the faster Tier, you can trigger an optimization which moves it right away. The optimization is also a scheduled task
Optimize-Volume -DriveLetter D -TierOptimize
I gather you can also use the followinig command to optimize it:
defrag.exe /C /H /K /G
When it comes to number of columns, you should be aware of this:
From a bad config to a good, you could go from this:
Working with Storage Spaces and DPM on 2022 platform
On server 2022 things have changed regarding ReFS.
It seems to me that you now can use Storage Tiering with ReFS according to Microsoft: