Featured Post

YouTube and link library for S2D.dk

2020/11/01

Fault domain awareness

 Fault domain awareness in Microsoft Failover Cluster

*** Disclaimer ***
s2d.dk is not responsible for any errors, or for the results obtained from the use of this information on s2d.dk. All information in this site is provided as "draft notes" and "as is", with no guarantee of completeness, accuracy, timeliness or of the results obtained from the use of this information. Always test in a lab setup, before use any of the information in production environment.
For any reference links to other websites we encourages you to read the privacy statements of the third-party websites.
The names of actual companies and products mentioned herein may be the trademarks of their respective owners.
***

Fault domain awareness in Microsoft Failover Cluster




PowerShell used in the Video

# Cluster and Node information
Get-ClusterNode | sort name | ft Name, State, StatusInformation, FaultDomain
Get-ClusterNode | sort name | ft Name, State, StatusInformation, FaultDomain | Out-File -FilePath C:\Temp\Review\Get-ClusterNode-ft.txt
Get-ClusterNode | sort name | fl *
Get-ClusterNode | sort name | fl * | Out-File -FilePath C:\Temp\Review\Get-ClusterNode-fl.txt

Start-Cluster
Stop-Cluster
Start-ClusterNode –ClearQuarantine
cls

# *************************************************************************************************************
# Fault domain awareness
# https://docs.microsoft.com/en-us/windows-server/failover-clustering/fault-domains
#
# Defining fault domains with PowerShell
# *************************************************************************************************************

Get-cluster | fl AutoAssignNodeSite

(Get-Cluster).AutoAssignNodeSite=1

Get-ClusterFaultDomain | sort name | ft -AutoSize
Get-ClusterFaultDomain | sort name | ft -AutoSize | Out-File -FilePath C:\Temp\Review\Get-ClusterFaultDomain-ft.txt
Get-ClusterFaultDomain | sort name | fl * 
Get-ClusterFaultDomain | sort name | fl * | Out-File -FilePath C:\Temp\Review\Get-ClusterFaultDomain-fl.txt

New-ClusterFaultDomain -Type Site -Name "Copenhagen" -Description "Microsoft Denmark"
New-ClusterFaultDomain -Type Rack -Name "RACK45"
New-ClusterFaultDomain -Type Rack -Name "RACK46"
New-ClusterFaultDomain -Type Rack -Name "RACK47"
New-ClusterFaultDomain -Type Rack -Name "RACK48"

Set-ClusterFaultDomain -Name "Copenhagen","RACK45", "RACK46", "RACK47", "RACK48" -Location "Bulding 92 Room 1"

Set-ClusterFaultDomain -Name "RACK45", "RACK46", "RACK47", "RACK48" -Parent "Copenhagen"

Set-ClusterFaultDomain -Name "S047011","S047012","S047013" -Parent "RACK47"
Set-ClusterFaultDomain -Name "S047014","S047015","S047016" -Parent "RACK48"

# *************************************************************************************************************
# Remove fault domains
# *************************************************************************************************************

Set-ClusterFaultDomain -Name "S047011","S047012","S047013","S047014","S047015","S047016" -Parent ""
Set-ClusterFaultDomain -Name "RACK45", "RACK46", "RACK47", "RACK48" -Parent ""

Remove-ClusterFaultDomain -Name "Copenhagen","RACK45", "RACK46", "RACK47", "RACK48"

(Get-Cluster).AutoAssignNodeSite=0

# *************************************************************************************************************