Windows Server Failover Clustering
Windows Server Failover Clustering
ClusterGroupName :
ComputerName : tgt01.srv.world
Description :
DiskType : Dynamic
HostVolumeId : {98785070-01DE-4ED5-A7CD-0DA847762122}
LocalMountDeviceId :
OriginalPath :
ParentPath :
Path : C:\iSCSIDisk\Disk01.vhdx
SerialNumber : A6E4E587-A0A5-4D60-8BA0-FFECF5C3A5B5
Size : 536870912
SnapshotIds :
Status : NotConnected
VirtualDiskIndex : 1038992480
ClusterGroupName :
ComputerName : tgt01.srv.world
Description :
DiskType : Dynamic
HostVolumeId : {98785070-01DE-4ED5-A7CD-0DA847762122}
LocalMountDeviceId :
OriginalPath :
ParentPath :
Path : C:\iSCSIDisk\Quorum01.vhdx
SerialNumber : 6E271242-7011-4F88-A8F9-F7B4F95933A6
Size : 536870912
SnapshotIds :
Status : NotConnected
VirtualDiskIndex : 282691262
# enable CHAP for iSCSI Target and set Username and Password for authentication
# required password length over 12 chars
PS C:\Users\Serverworld> Set-IscsiServerTarget `
-TargetName "iSCSITarget01" `
-EnableChap $True `
-Chap (New-Object PSCredential("username", (ConvertTo-SecureString -AsPlainText
"UserP@ssw0rd01" -Force)))`
-PassThru
ChapUserName : username
ClusterGroupName :
ComputerName : tgt01.srv.world
Description :
EnableChap : True
EnableReverseChap : False
EnforceIdleTimeoutDetection : True
FirstBurstLength : 65536
IdleDuration : 00:00:00
InitiatorIds : {IPAddress:10.0.0.101, IPAddress:10.0.0.102}
LastLogin : 1/23/2023 8:44:27 PM
LunMappings : {TargetName:iSCSITarget01;VHD:"C:\iSCSIDisk\
Quorum01.vhdx";LUN:0}
MaxBurstLength : 262144
MaxReceiveDataSegmentLength : 65536
ReceiveBufferCount : 10
ReverseChapUserName :
Sessions : {400001370001-0100, 400001370001-0300}
Status : Connected
TargetIqn : iqn.1991-05.com.microsoft:tgt01-iscsitarget01-target
TargetName : iSCSITarget01
# confirm settings
PS C:\Users\Serverworld> Get-IscsiServerTarget -TargetName "iSCSITarget01"
ChapUserName : username
ClusterGroupName :
ComputerName : tgt01.srv.world
Description :
EnableChap : True
EnableReverseChap : False
EnforceIdleTimeoutDetection : True
FirstBurstLength : 65536
IdleDuration : 00:00:00
InitiatorIds : {IPAddress:10.0.0.101, IPAddress:10.0.0.102}
LastLogin : 1/23/2023 8:44:27 PM
LunMappings : {TargetName:iSCSITarget01;VHD:"C:\iSCSIDisk\
Quorum01.vhdx";LUN:0}
MaxBurstLength : 262144
MaxReceiveDataSegmentLength : 65536
ReceiveBufferCount : 10
ReverseChapUserName :
Sessions : {400001370001-0100, 400001370001-0300}
Status : Connected
TargetIqn : iqn.1991-05.com.microsoft:tgt01-iscsitarget01-target
TargetName : iSCSITarget01
# restart service
PS C:\Users\Serverworld> Restart-Service -Name WinTarget
[3] Configure iSCSI Initiator and login to Target Server on all Cluster Nodes.
PS C:\Users\Serverworld> Start-Service -Name MSiSCSI
PS C:\Users\Serverworld> Set-Service -Name MSiSCSI -StartupType Automatic
PS C:\Users\Serverworld> New-IscsiTargetPortal -TargetPortalAddress "10.0.0.110"
InitiatorInstanceName :
InitiatorPortalAddress :
IsDataDigest : False
IsHeaderDigest : False
TargetPortalAddress : 10.0.0.110
TargetPortalPortNumber : 3260
PSComputerName :
PS C:\Users\Serverworld> Get-IscsiTarget
PS C:\Users\Serverworld> Connect-IscsiTarget `
-NodeAddress iqn.1991-05.com.microsoft:tgt01-iscsitarget01-target `
-AuthenticationType ONEWAYCHAP `
-ChapUsername "username" `
-ChapSecret "UserP@ssw0rd01" `
-IsPersistent $True
AuthenticationType : ONEWAYCHAP
InitiatorInstanceName : ROOT\ISCSIPRT\0000_0
InitiatorNodeAddress : iqn.1991-05.com.microsoft:rx-7.srv.world
InitiatorPortalAddress : 0.0.0.0
InitiatorSideIdentifier : 400001370000
IsConnected : True
IsDataDigest : False
IsDiscovered : True
IsHeaderDigest : False
IsPersistent : True
NumberOfConnections : 1
SessionIdentifier : ffff8c8d315f8010-4000013700000004
TargetNodeAddress : iqn.1991-05.com.microsoft:tgt01-iscsitarget01-target
TargetSideIdentifier : 0100
PSComputerName :
PS C:\Users\Serverworld> Get-IscsiConnection
ConnectionIdentifier : ffff8c8d315f8010-4
InitiatorAddress : 0.0.0.0
InitiatorPortNumber : 40695
TargetAddress : 10.0.0.110
TargetPortNumber : 3260
PSComputerName :
DiskPath: \\?\scsi#disk&ven_msft&prod_virtual_hd#1&1c121344&0&000000#{53f56307-
b6bf-11d0-94f2-00a0c91efb8b}
Name
----
Cluster01
# confirm settings
PS C:\Users\Serverworld> Get-Cluster | Format-List -Property *
AddEvictDelay : 60
AdministrativeAccessPoint : ActiveDirectoryAndDns
AutoAssignNodeSite : 1
AutoBalancerMode : 2
AutoBalancerLevel : 1
BackupInProgress : 0
BlockCacheSize : 1024
DetectedCloudPlatform : None
DetectManagedEvents : 1
DetectManagedEventsThreshold : 60
ClusSvcHangTimeout : 135
ClusSvcRegroupStageTimeout : 15
ClusSvcRegroupTickInMilliseconds : 300
ClusterEnforcedAntiAffinity : 0
ClusterFunctionalLevel : 11
ClusterUpgradeVersion : 4
ClusterGroupWaitDelay : 120
ClusterLogLevel : 3
ClusterLogSize : 1536
CrossSiteDelay : 1000
CrossSiteThreshold : 20
CrossSubnetDelay : 1000
CrossSubnetThreshold : 20
CsvBalancer : 1
DatabaseReadWriteMode : 0
DefaultNetworkRole : 3
Description :
Domain : srv.world
DrainOnShutdown : 1
DumpPolicy : 1376850201
DynamicQuorum : 1
EnableSharedVolumes : Enabled
FixQuorum : 0
GroupDependencyTimeout : 600
HangRecoveryAction : 6
Id : 12e92f11-d9db-42d5-a350-6f8ec56c5d25
IgnorePersistentStateOnStartup : 0
LogResourceControls : 0
LowerQuorumPriorityNodeId : 0
MaximumParallelMigrations : 1
MessageBufferLength : 50
MinimumNeverPreemptPriority : 3000
MinimumPreemptorPriority : 1
Name : Cluster01
NetftIPSecEnabled : 1
PlacementOptions : 0
PlumbAllCrossSubnetRoutes : 0
PreferredSite :
PreventQuorum : 0
QuarantineDuration : 7200
QuarantineThreshold : 3
QuorumArbitrationTimeMax : 20
RecentEventsResetTime : 12/27/2022 1:58:19 AM
RequestReplyTimeout : 60
ResiliencyDefaultPeriod : 240
ResiliencyLevel : AlwaysIsolate
RouteHistoryLength : 40
S2DBusTypes : 0
S2DCacheBehavior : Default
S2DCacheDesiredState : Enabled
S2DCacheMetadataReserveBytes : 34359738368
S2DCachePageSizeKBytes : 16
S2DEnabled : 0
S2DIOLatencyThreshold : 10000
S2DOptimizations : 0
WprSessionCount : 2
WprSessionCoolOffTime : 600
SameSubnetDelay : 1000
SameSubnetThreshold : 20
SecurityLevel : 1
SecurityLevelForStorage : 0
SetSMBBandwidthLimit : 1
SMBBandwidthLimitFactor : 2500
SharedVolumeCompatibleFilters : {}
SharedVolumeIncompatibleFilters : {}
SharedVolumeSecurityDescriptor : {1, 0, 4, 128...}
SharedVolumesRoot : C:\ClusterStorage
SharedVolumeVssWriterOperationTimeout : 1800
ShutdownTimeoutInMinutes : 20
UseClientAccessNetworksForSharedVolumes : 2
WitnessDatabaseWriteTimeout : 300
WitnessDynamicWeight : 1
WitnessRestartInterval : 15
EnabledEventLogs : {Microsoft-Windows-Hyper-V-VmSwitch-Diagnostic,4,0xFFFF
Microsoft-Windows-SMBDirect/Debug,4,
Microsoft-Windows-SMBServer/Analytic,
Microsoft-Windows-Kernel-LiveDump/Analytic}
UseRdmaForStorage : 1
[3] Verify it's possible to access to Cluster IP address from an any Computer in your Network.
# for example, access via SSH to Cluster IP address
PS C:\Users\Serverworld> ssh [email protected]
[email protected]'s password:
PS C:\Users\Serverworld> Get-ClusterNode
PS C:\Users\Serverworld> hostname
rx-7
PS C:\Users\Serverworld> Get-Volume
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
PS C:\Users\serverworld> Get-ClusterNode
PS C:\Users\Serverworld> hostname
rx-8
PS C:\Users\Serverworld> Get-Volume
[5] Right-Click [Failover Cluster Manager] on the left pane and start [Create Cluster].
[6] Click [Nect] button.
[7] Input Hostname in [Enter server name] field and Click [add] button, then it is
added in [Selected servers]. After adding all Nodes, Click [Nect] button.
[8] Input any Cluster name in [Cluster Name] field and also set IP address for the Cluster name in [
[9] Confirm settings and proceed to next if that's OK.
[10] After finishing creation, Click [Finish] button.
[11] It's possible to manage Cluster on [Failover Cluster Manager].
Windows Server Failover Clustering : Add Shared Storage
Add New Shared Storage for data saving as a Cluster Disk to existing WSFC Cluster.
|
+----------------------+ | +----------------------+
| [ AD DS ] |10.0.0.100 | 10.0.0.110| [ iSCSI Target ] |
| fd3s.srv.world +-----------+-----------+ tgt01.srv.world |
| | | | |
+----------------------+ | +----------------------+
|
+----------------------+ | +----------------------+
| [ Cluster Node#1 ] |10.0.0.101 | 10.0.0.102| [ Cluster Node#2 ] |
| rx-7.srv.world +-----------+-----------+ rx-8.srv.world |
| | | |
+----------------------+ +----------------------+
PS C:\Users\Administrator> Get-IscsiServerTarget
ChapUserName : username
ClusterGroupName :
ComputerName : tgt01.srv.world
Description :
EnableChap : True
EnableReverseChap : False
EnforceIdleTimeoutDetection : True
FirstBurstLength : 65536
IdleDuration : 00:00:00
InitiatorIds : {IPAddress:10.0.0.101, IPAddress:10.0.0.102}
LastLogin : 1/23/2023 8:59:05 PM
LunMappings : {TargetName:iSCSITarget01;VHD:"C:\iSCSIDisk\
Quorum01.vhdx";LUN:0}
MaxBurstLength : 262144
MaxReceiveDataSegmentLength : 65536
ReceiveBufferCount : 10
ReverseChapUserName :
Sessions : {400001370001-0100, 400001370001-0200}
Status : Connected
TargetIqn : iqn.1991-05.com.microsoft:tgt01-iscsitarget01-target
TargetName : iSCSITarget01
# create a shared disk for Data (specify any size you need for Data disk)
PS C:\Users\Serverworld> New-IscsiVirtualDisk -Path "C:\iSCSIDisk\DataDisk01.vhdx"
-SizeBytes 30GB
ClusterGroupName :
ComputerName : tgt01.srv.world
Description :
DiskType : Dynamic
HostVolumeId : {98785070-01DE-4ED5-A7CD-0DA847762122}
LocalMountDeviceId :
OriginalPath :
ParentPath :
Path : C:\iSCSIDisk\DataDisk01.vhdx
SerialNumber : C43A21B2-7692-4E27-B8BD-E0931F58AE5B
Size : 32212254720
SnapshotIds :
Status : NotConnected
VirtualDiskIndex : 403855565
# confirm settings
PS C:\Users\Serverworld> Get-IscsiServerTarget -TargetName "iSCSITarget01"
ChapUserName : username
ClusterGroupName :
ComputerName : tgt01.srv.world
Description :
EnableChap : True
EnableReverseChap : False
EnforceIdleTimeoutDetection : True
FirstBurstLength : 65536
IdleDuration : 00:00:00
InitiatorIds : {IPAddress:10.0.0.101, IPAddress:10.0.0.102}
LastLogin : 1/23/2023 8:59:05 PM
LunMappings : {TargetName:iSCSITarget01;VHD:"C:\iSCSIDisk\
Quorum01.vhdx";LUN:0,
TargetName:iSCSITarget01;VHD:"C:\iSCSIDisk\
DataDisk01.vhdx";LUN:1}
MaxBurstLength : 262144
MaxReceiveDataSegmentLength : 65536
ReceiveBufferCount : 10
ReverseChapUserName :
Sessions : {400001370001-0100, 400001370001-0200}
Status : Connected
TargetIqn : iqn.1991-05.com.microsoft:tgt01-iscsitarget01-target
TargetName : iSCSITarget01
[3] On a Node which is the primary in Cluster, Format iSCSI disk with NTFS and add it to the Cluste
# show disks
PS C:\Users\Serverworld> Get-Disk | Format-Table -AutoSize -Wrap
DiskPath: \\?\Disk{66db646e-c7be-ffde-6502-247d73f510ff}
PartitionNumber DriveLetter Offset Size
Type
--------------- ----------- ------ ----
----
2 G 16777216 29.98 GB
Basic
PS C:\Users\Serverworld> Get-ClusterResource
[3] Configure iSCSI Initiator on New Node and login to iSCSI Target .
[4] Install [Failover Clustering] feature on New Node .
[5] Logon to a Node that you installed Cluster Adminisrative tools and then Add a New Node.
# [-Cluster] ⇒ target Cluster name
# [-Name] ⇒ hostname of the New Node
PS C:\Users\Serverworld> Add-ClusterNode -Cluster "Cluster01" -Name "RX-9"
[10] Right-Click a Cluster name on the left pane and start [Add Node].
[11] Click [Next] button.
[12] Add new Nodes and proceed to next.
[13] Click [Next] button.
[14] Click [Next] button.
[15] Click [Next] button.
[16] Click [Next] button.
[17] Confirm results and Click [Finish] button.
[18] Click [Next] button.
[19] Click [Finish] button.
[20] After adding a new Node successfully, it is displayed on management console.
Windows Server Failover Clustering : Remove Nodes
[1] Logon to a Node that you installed Cluster Adminisrative tools and then Remove a
Node.
# [-Cluster] ⇒ target Cluster name
# [-Name] ⇒ target Node name
PS C:\Users\Serverworld> Remove-ClusterNode -Cluster "Cluster01" -Name "RX-9"
Remove-ClusterNode
Are you sure you want to evict node RX-9?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y
It's possible to configure WSFC Cluster if Nodes are not in Active Directory domain.
This example is based on the environment like follows.
Prepare 2 Nodes for clustering and they have shared storages for clustering provided
from iSCSI Target Server.
|
+----------------------+ | +----------------------+
| [ iSCSI Target ] |10.0.0.110 | 10.0.0.101| [ Cluster Node#1 ] |
| tgt01.srv.world +-----------+-----------+ rx-7.srv.world |
| | | | |
+----------------------+ | +----------------------+
|
| +----------------------+
| 10.0.0.102| [ Cluster Node#2 ] |
+-----------+ rx-8.srv.world |
| |
+----------------------+
On CUI Configuration, run PowerShell and Set like follows.
[1] Install [Failover Clustering] feature on all Nodes, refer to here .
[2] Configure shared storage for Cluster, refer to here .
[3] Logon to a Node that has cluster administration tools and Test to create cluster to
verify each Nodes settings.
On WorkGroup environment, it needs Administrator passwords on all Nodes are
the same for creating Cluster.
If some errors are shown, improve your System and retry Test Job.
For [WARNING] items, you should care them but they are not essential requisites,
so if [ClusterConditionallyApproved] is shown, it's possible to create a Cluster.
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Name
----
Cluster01
# confirm settings
PS C:\Users\Administrator> Get-Cluster | Format-List -Property *
AddEvictDelay : 60
AdministrativeAccessPoint : Dns
AutoAssignNodeSite : 1
AutoBalancerMode : 2
AutoBalancerLevel : 1
BackupInProgress : 0
BlockCacheSize : 1024
DetectedCloudPlatform : None
DetectManagedEvents : 1
DetectManagedEventsThreshold : 60
ClusSvcHangTimeout : 135
ClusSvcRegroupStageTimeout : 15
ClusSvcRegroupTickInMilliseconds : 300
ClusterEnforcedAntiAffinity : 0
ClusterFunctionalLevel : 11
ClusterUpgradeVersion : 4
ClusterGroupWaitDelay : 120
ClusterLogLevel : 3
ClusterLogSize : 1536
CrossSiteDelay : 1000
CrossSiteThreshold : 20
CrossSubnetDelay : 1000
CrossSubnetThreshold : 20
CsvBalancer : 1
DatabaseReadWriteMode : 0
DefaultNetworkRole : 3
Description :
Domain : srv.world
DrainOnShutdown : 1
DumpPolicy : 1376850201
DynamicQuorum : 1
EnableSharedVolumes : Enabled
FixQuorum : 0
GroupDependencyTimeout : 600
HangRecoveryAction : 6
Id : 77a2528c-f961-4734-93c9-862f34e2441e
IgnorePersistentStateOnStartup : 0
LogResourceControls : 0
LowerQuorumPriorityNodeId : 0
MaximumParallelMigrations : 1
MessageBufferLength : 50
MinimumNeverPreemptPriority : 3000
MinimumPreemptorPriority : 1
Name : Cluster01
NetftIPSecEnabled : 1
PlacementOptions : 0
PlumbAllCrossSubnetRoutes : 0
PreferredSite :
PreventQuorum : 0
QuarantineDuration : 7200
QuarantineThreshold : 3
QuorumArbitrationTimeMax : 20
RecentEventsResetTime : 12/27/2022 5:31:16 AM
RequestReplyTimeout : 60
ResiliencyDefaultPeriod : 240
ResiliencyLevel : AlwaysIsolate
RouteHistoryLength : 40
S2DBusTypes : 0
S2DCacheBehavior : Default
S2DCacheDesiredState : Enabled
S2DCacheMetadataReserveBytes : 34359738368
S2DCachePageSizeKBytes : 16
S2DEnabled : 0
S2DIOLatencyThreshold : 10000
S2DOptimizations : 0
WprSessionCount : 2
WprSessionCoolOffTime : 600
SameSubnetDelay : 1000
SameSubnetThreshold : 20
SecurityLevel : 1
SecurityLevelForStorage : 0
SetSMBBandwidthLimit : 1
SMBBandwidthLimitFactor : 2500
SharedVolumeCompatibleFilters : {}
SharedVolumeIncompatibleFilters : {}
SharedVolumeSecurityDescriptor : {1, 0, 4, 128...}
SharedVolumesRoot : C:\ClusterStorage
SharedVolumeVssWriterOperationTimeout : 1800
ShutdownTimeoutInMinutes : 20
UseClientAccessNetworksForSharedVolumes : 2
WitnessDatabaseWriteTimeout : 300
WitnessDynamicWeight : 1
WitnessRestartInterval : 15
EnabledEventLogs : {Microsoft-Windows-Hyper-V-VmSwitch-
Diagnostic,4,0xFFFFFFFD,
Microsoft-Windows-SMBDirect/Debug,4,
Microsoft-Windows-SMBServer/Analytic,
Microsoft-Windows-Kernel-LiveDump/Analytic}
UseRdmaForStorage : 1
[5] Verify it's possible to access to Cluster IP address from an any Computer in your Network.
# for example, access via SSH to Cluster IP address
PS C:\Users\Administrator> ssh [email protected]
[email protected]'s password:
Microsoft Windows [Version 10.0.20348.1311]
(c) Microsoft Corporation. All rights reserved.
PS C:\Users\Administrator> Get-ClusterNode
PS C:\Users\Administrator> hostname
rx-7
PS C:\Users\Administrator> Get-Volume
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
PS C:\Users\Administrator> Get-ClusterNode
PS C:\Users\Administrator> hostname
rx-8
PS C:\Users\Administrator> Get-Volume