Windows Server Failover Clustering : Configure Shared Storage2022/12/27 |
Configure Windows Server Failover Clustering (WSFC).
This example is based on the environment like follows.
Prepare 2 Nodes for clustering and they are in Active Directory domain (AD is not mandatory requirements). Furthermore, they have shared storages for clustering provided from iSCSI Target Server. | +----------------------+ | +----------------------+ | [ 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 | | | | | +----------------------+ +----------------------+ |
On CUI Configuration, run PowerShell and Set like follows.
|
|
[1] | |
[2] | Configure shared storage on iSCSI Target Server that is used as Quorum disk in Cluster. |
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. # create [iSCSITarget01] target # specify Nodes for InitiatorId PS C:\Users\Serverworld> New-IscsiServerTarget -TargetName "iSCSITarget01" -InitiatorId @("IPAddress:10.0.0.101","IPAddress:10.0.0.102") 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 # create a shared disk for Quorum (generally 512MB is enough size) PS C:\Users\Serverworld> New-IscsiVirtualDisk -Path "C:\iSCSIDisk\Quorum01.vhdx" -SizeBytes 512MB 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 # assign disks to iSCSI target PS C:\Users\Serverworld> Add-IscsiVirtualDiskTargetMapping -TargetName "iSCSITarget01" -Path "C:\iSCSIDisk\Quorum01.vhdx" # 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 IsConnected NodeAddress PSComputerName ----------- ----------- -------------- False iqn.1991-05.com.microsoft:tgt01-iscsitarget01-target 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 : |
[4] | On a Node in Cluster, Format iSCSI disk with NTFS. |
# show disks PS C:\Users\Serverworld> Get-Disk | Format-Table -AutoSize -Wrap Number Friendly Name Serial Number HealthStatus OperationalStatus Total Size Partition Style ------ ------------- ------------- ------------ ----------------- ---------- -------- 2 MSFT Virtual HD 6E271242-7011-4F88-A8F9-F7B4F95933A6 Healthy Offline 512 MB RAW 0 VMware Virtual NVMe Disk VMWare NVME_0000 Healthy Online 120 GB GPT 1 VMware Virtual NVMe Disk VMWare NVME_0000 Healthy Online 80 GB GPT # turn to online and initialize with GPT PS C:\Users\Serverworld> Set-Disk -Number 2 -IsOffline $False PS C:\Users\Serverworld> Initialize-Disk -Number 2 -PartitionStyle GPT # create partition with assigning drive letter PS C:\Users\Serverworld> New-Partition -DiskNumber 2 -UseMaximumSize -AssignDriveLetter DiskPath: \\?\scsi#disk&ven_msft&prod_virtual_hd#1&1c121344&0&000000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b} PartitionNumber DriveLetter Offset Size Type --------------- ----------- ------ ---- ---- 2 F 16777216 495.94 MB Basic # format with NTFS PS C:\Users\Serverworld> Format-Volume -DriveLetter F -FileSystem NTFS -Force DriveLetter FriendlyName FileSystemType DriveType HealthStatus OperationalStatus SizeRemaining Size ----------- ------------ -------------- --------- ------------ ----------------- ------------- ---- F NTFS Fixed Healthy OK 479.71 MB 495.93 MB |
Windows Server Failover Clustering : Configure Shared Storage (GUI)
|
On GUI Configuration, Configure like follows.
|
|
[5] | |
[6] |
Configure iSCSI Target Server to create a shared storage that is used as Quorum disk in Cluster, refer to here.
On this example, configure following settings.
iSCSI Target ⇒ [iSCSITarget01]
shared storage ⇒ [C:\iSCSIDisk\Quorum01.vhdx] (512MB) |
[7] |
Configure iSCSI Initiator on all Nodes and login to iSCSI Target, refer to here.
After login to iSCSI Target, format iSCSI disks with NTFS on a Node.
|
Sponsored Link |