Deploy storage spaces on 3 hosts with 2 nVME in each.

This seems impossible to find documentation on, so lets do it!

I built a whitebox environment with:

3x Hosts running the following hardware each:

1x Ryzen 9 5950X
128GB RAM
1x500GB SSD SATA as system disk
2x2TB nvme M.2 disks

Everything running Windows Server 2022 Datacenter (but the same seems to apply to Windows Server 2019 datacenter as well).

What I want to do is to use all the nvme disks to utilize clustered redundant storage.

So...lets go! Open an elevated powershell on one of the hosts!

First, run a test

 Test-Cluster –Node SrvHyp01, SrvHyp02, SrvHyp03 –Include “Storage Spaces Direct”, “Inventory”, “Network”, “System Configuration”

Then, run....

$ServerList = "SrvHyp01", "SrvHyp02", "SrvHyp03"


Invoke-Command ($ServerList) {

    Update-StorageProviderCache

    Get-StoragePool | ? IsPrimordial -eq $false | Set-StoragePool -IsReadOnly:$false -ErrorAction SilentlyContinue

    Get-StoragePool | ? IsPrimordial -eq $false | Get-VirtualDisk | Remove-VirtualDisk -Confirm:$false -ErrorAction SilentlyContinue

    Get-StoragePool | ? IsPrimordial -eq $false | Remove-StoragePool -Confirm:$false -ErrorAction SilentlyContinue

    Get-PhysicalDisk | Reset-PhysicalDisk -ErrorAction SilentlyContinue

    Get-Disk | ? Number -ne $null | ? IsBoot -ne $true | ? IsSystem -ne $true | ? PartitionStyle -ne RAW | % {

        $_ | Set-Disk -isoffline:$false

        $_ | Set-Disk -isreadonly:$false

        $_ | Clear-Disk -RemoveData -RemoveOEM -Confirm:$false

        $_ | Set-Disk -isreadonly:$true

        $_ | Set-Disk -isoffline:$true

    }

    Get-Disk | Where Number -Ne $Null | Where IsBoot -Ne $True | Where IsSystem -Ne $True | Where PartitionStyle -Eq RAW | Group -NoElement -Property FriendlyName

} | Sort -Property PsComputerName, Count


Then enable storage spaces

Enable-ClusterStorageSpacesDirect -CimSession <your cluster FQDN>



The storage space is now created, do not forget to...

Make a volume spanning all space in WAC

The area will now be shared between all hosts and have 3,6TB usable space.

Kommentarer