Install-WindowsFeature -Name Hyper-V, Failover-Clustering, Data-Center-Bridging, BitLocker, FS-FileServer, RSAT-Clustering-PowerShell, FS-Data-Deduplication -IncludeAllSubFeature -IncludeManagementTools -verboseHae ohjainversioiden luettelo:
Get-PnpDevice | Select-Object Name, @{l='DriverVersion';e={(Get-PnpDeviceProperty -InstanceId $_.InstanceId -KeyName 'DEVPKEY_Device_DriverVersion').Data}} -Unique | Where-Object {($_.Name -like "*HBA*") -or ($_.Name -like "*mellanox*") -or ($_.Name -like "*Qlogic*") -or ($_.Name -like "*X710*") -or ($_.Name -like "*intel*") -or ($_.Name -like "*Broadcom*") -or ($_.Name -like "*marvell*") }Määritä klusterisolmun nimi:
Rename-Computer -NewName CN01 -RestartKlusteritesti
Test-Cluster -Node CN01, CN02 –Include 'Storage Spaces Direct', 'Inventory', 'Network', 'System Configuration'Tallennusvarantojen levyjen tilan selvittäminen
Get-PhysicalDiskUuden S2D-klusterin luominen
New-Cluster -Name S2DSystem -Node CN01, CN02 -StaticAddress 192.168.10.33 -NoStorage -IgnoreNetwork 172.16.103.0/24, 172.16.104.0/24 -VerboseStorage Spaces Directin käyttöönotto:
Enable-ClusterS2D -VerboseAiempien komentojen tulosten kerääminen
Get-ClusterS2D Get-StoragePool Get-StorageSubSystem -FriendlyName *Cluster* | Get-StorageHealthReportIsännän hallintaverkon määrittäminen alemmalle prioriteetille reaaliaikaista siirtoa varten:
$clusterResourceType = Get-ClusterResourceType -Name 'Virtual Machine' $hostNetworkID = Get-ClusterNetwork | Where-Object { $_.Address -eq ‘192.168.10.0’ } | Select-Object -ExpandProperty ID $otherNetworkID = (Get-ClusterNetwork).Where({$_.ID -ne $hostnetworkID}).ID $newMigrationOrder = ($otherNetworkID + $hostNetworkID) -join ';' Set-ClusterParameter -InputObject $clusterResourceType -Name MigrationNetworkOrder -Value $newMigrationOrder Set-VmHost -VirtualMachine MigrationPerformanceOption SMBSivutiedostojen asetukset, joilla varmistetaan muistivedoksen tallentaminen:
$blockCacheMB = (Get-Cluster).BlockCacheSize $blockCacheMB = (Get-Cluster).BlockCacheSize $pageFilePath = "C:\pagefile.sys" $initialSize = [Math]::Round(51200 + $blockCacheMB) $maximumSize = [Math]::Round(51200 + $blockCacheMB) $system = Get-WmiObject -Class Win32_ComputerSystem -EnableAllPrivileges if ($system.AutomaticManagedPagefile) { $system.AutomaticManagedPagefile = $false $system.Put() } $currentPageFile = Get-WmiObject -Class Win32_PageFileSetting if ($currentPageFile.Name -eq $pageFilePath) { $currentPageFile.InitialSize = $InitialSize $currentPageFile.MaximumSize = $MaximumSize $currentPageFile.Put() }else{ $currentPageFile.Delete() Set-WmiInstance -Class Win32_PageFileSetting -Arguments @{Name=$pageFilePath; InitialSize = $initialSize; MaximumSize = $maximumSize} } #Configure cluster witness. Active Directory Cluster Name Object must be given write access on file #share before running this step: Set-ClusterQuorum -NodeAndFileShareMajority \\VDC01\ClusterQuorum
Poista SMB (Server Message Block) -allekirjoitus käytöstä; oletusarvoisesti poissa käytöstä normaalissa Windows Server -asennuksessa.
Set-SmbServerConfiguration -RequireSecuritySignature $FALSE -forceSpaces-portin aikakatkaisukokoonpanon muutos:
Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\spaceport \Parameters -Name HwTimeout -Value 0x00002710 -Verbose Restart-Computer -Force