Deployment Guide

43 Dell EMC Solutions for Microsoft Azure Stack HCI Networking Guide
If there are existing partitions or other data on the drives, the drives must be cleaned before creating the host
cluster.
Warning: With the exception of the boot drives, the following script removes all data from all disks on the
hosts specified in $ServerList. For more information, see https://docs.microsoft.com/en-us/windows-
server/storage/storage-spaces/deploy-storage-spaces-direct.
All disks eligible to be used in the storage pool may be cleaned by running the following script on the
management system:
PS> $ServerList = "storage-01", "storage-02", "storage-03", "storage-04"
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
Note: Replace the names in $ServerList above with the Ready Node names used in your environment.
When complete, the output of the above script lists disks and hostnames similar to the following:
Count Name PSComputerName
----- ---- --------------
2 ATA MZ7KM960HMJP0D3 storage-01
4 ATA ST4000NM0265-2DC storage-01
2 ATA MZ7KM960HMJP0D3 storage-02
4 ATA ST4000NM0265-2DC storage-02
2 ATA MZ7KM960HMJP0D3 storage-03
4 ATA ST4000NM0265-2DC storage-03
2 ATA MZ7KM960HMJP0D3 storage-04
4 ATA ST4000NM0265-2DC storage-04