Using storage caching on a standalone windows server
Sometimes you might require high performance storage on a standalone server system - for example on a system running quite speedy backup storage.
One of the many ways to do this is to take a standalone windows server and enable storagebuscache - this allows you to use flash devices (mostly NVMe) as cache tier for rotational storage.
Technically storagebuscache creates bindings between disks so that a fast device is the cache for a certain amount of slower devices. This implies that it works best if you have a multiple of slow devices than fast ones.
Steps to enable storage bus cache
The steps required to enable SBC are:
- Install Failover-Clusterin components (required to provide SBL)
- Enable StorageBusCache
- Create volume(s)
Enable clustering features
First, enable the failover-clustering features:
Install-WindowsFeature -Name Failover-Clustering –IncludeManagementTools
This is required because storagebuscache is building on top of storage bus layer which is a feature of failover-clustering. Having said that, you don't need to create a cluster.
Enable storagebuscache
Having enabled clustering, now it's time to enable storagebus cache
Enable-StorageBusCache
This will enable the storagebuscache and create a mapping of cache devices already.
Create a volume
Having set up the cache, it's time to create some volume to actually store data.
New-Volume -FriendlyName SBC-Vol-0 -FileSystem ReFS -StoragePoolFriendlyName SBC-Pool -ResiliencySettingName Parity -PhysicalDiskRedundancy 2 -Size 1024GB
I'm using parity here as we're having a very fast write cache that receives the write-bursts. Besides bursts that don't exceed the cache size, the workload is not too heavy, parity can write down data fast enough.
Checking the cache status
To check the status, you can use
Get-StorageBusCache
This might look like this
Get-StorageBusCache
ProvisionMode : Shared
SharedCachePercent : 15
CacheMetadataReserveBytes : 34359738368
CacheModeHDD : ReadWrite
CacheModeSSD : WriteOnly
CachePageSizeKBytes : 16
Enabled : True
To check out the bindings, you can use this:
Get-StorageBusBinding
DeviceGuid DeviceNumber CacheDeviceGuid CacheDeviceNumber CacheMode DirtyByteCount TotalByteCount
---------- ------------ --------------- ----------------- --------- -------------- --------------
{5db88fe5-1178-31df-e8d6-836e1823baf3} 506 {63679f99-bd48-c371-73fd-87bfa10c84ab} 512 WriteOnly 0 B 0 B
{3d66e3a1-d900-8c70-1860-cff6a82e1aa0} 502 {873b315d-c5a1-39b7-8028-7b3095c56e42} 509 WriteOnly 0 B 0 B
{46f64419-0fac-fea2-8171-c2e730da8e28} 504 {6ac3c97d-c429-5d63-33d2-400365a9624e} 510 WriteOnly 0 B 0 B
{f28fdca1-42fc-ea75-5d51-4e4dd403b1e0} 507 {38b68476-a31b-2bc1-f230-b2e6f1637c20} 511 WriteOnly 0 B 0 B