Hyper-converged solution in Windows Server
  • Introduction
  • Intro
    • Introduction
    • Requirements
    • Topology
  • Preparing the servers
    • Server 1: The Domain Controller
    • Prepping the 2 HC servers
    • Server 2: HyperConvergence 1
    • Server 3: HyperConvergence 2
  • Set up the Fail over cluster with storage spaces direct
    • Test the cluster
    • Build the cluster
    • Add a cluster witness
    • Clean the disks
    • Enable storage spaces direct
    • Create cluster-volumes
  • Setup Hyper-V and test
    • The next steps
    • Edit Hyper-V Paths
    • Create a High Available VM
    • Test it
    • Where to go from here
  • Extra
    • Add a 3rd node
Powered by GitBook
On this page

Was this helpful?

  1. Set up the Fail over cluster with storage spaces direct

Clean the disks

PreviousAdd a cluster witnessNextEnable storage spaces direct

Last updated 5 years ago

Was this helpful?

In this phase we'll use a prepared Microsoft script ()to clean and add all the disks (8 in total) to our cluster.

icm (Get-Cluster -Name <cluster or node name> | Get-ClusterNode) {

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 |? Number -ne $null |? IsBoot -ne $true |? IsSystem -ne $true |? PartitionStyle -eq RAW | Group -NoElement -Property FriendlyName

} | Sort -Property PsComputerName,Count

Your results shouldn't be different, if you are doing this setup completely virtually.

I didn't take any screenshot before (shame on me). But all this time this should've been empty. If you're stuck at this point in time, maybe troubleshoot this. We used "-nostorage" as a parameter when we .

Step 3.4
build the cluster