Windows Server Failover Clustering : Configure Shared Storage2024/12/23 |
Configure Windows Server Failover Clustering (WSFC).
This example is based on the environment like follows. | +----------------------+ | +----------------------+ | [ 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") ChapUserName : ClusterGroupName : ComputerName : tgt01.srv.world Description : EnableChap : False EnableReverseChap : False EnforceIdleTimeoutDetection : True FirstBurstLength : 65536 IdleDuration : 00:00:00 InitiatorIds : {IPAddress:10.0.0.101, IPAddress:10.0.0.102} LastLogin : LunMappings : {} MaxBurstLength : 262144 MaxReceiveDataSegmentLength : 65536 ReceiveBufferCount : 10 ReverseChapUserName : Sessions : {} Status : NotConnected TargetIqn : iqn.1991-05.com.microsoft:tgt01-iscsitarget01-target TargetName : iSCSITarget01 # 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 : {95471308-8C32-4533-A343-B2338BD6D05F} LocalMountDeviceId : OriginalPath : ParentPath : Path : C:\iSCSIDisk\Quorum01.vhdx SerialNumber : 67D31FBD-27F5-4FE5-A609-0496236D39EA Size : 536870912 SnapshotIds : Status : NotConnected VirtualDiskIndex : 2007973245 # 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:01:33 InitiatorIds : {IPAddress:10.0.0.101, IPAddress:10.0.0.102} LastLogin : LunMappings : {TargetName:iSCSITarget01;VHD:"C:\iSCSIDisk\Quorum01.vhdx";LUN:0} MaxBurstLength : 262144 MaxReceiveDataSegmentLength : 65536 ReceiveBufferCount : 10 ReverseChapUserName : Sessions : {} Status : NotConnected 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:02:03 InitiatorIds : {IPAddress:10.0.0.101, IPAddress:10.0.0.102} LastLogin : LunMappings : {TargetName:iSCSITarget01;VHD:"C:\iSCSIDisk\Quorum01.vhdx";LUN:0} MaxBurstLength : 262144 MaxReceiveDataSegmentLength : 65536 ReceiveBufferCount : 10 ReverseChapUserName : Sessions : {} Status : NotConnected 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 : ffffd5868ecfd010-4000013700000002 TargetNodeAddress : iqn.1991-05.com.microsoft:tgt01-iscsitarget01-target TargetSideIdentifier : 0100 PSComputerName : PS C:\Users\Serverworld> Get-IscsiConnection ConnectionIdentifier : ffffd5868ecfd010-1 InitiatorAddress : 0.0.0.0 InitiatorPortNumber : 30661 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 ------ ------------- ------------- ------------ ----------------- ---------- --------------- 1 MSFT Virtual HD 67D31FBD-27F5-4FE5-A609-0496236D39EA Healthy Offline 512 MB RAW 0 QEMU HARDDISK QM00001 Healthy Online 80 GB GPT # turn to online and initialize with GPT PS C:\Users\Serverworld> Set-Disk -Number 1 -IsOffline $False PS C:\Users\Serverworld> Initialize-Disk -Number 1 -PartitionStyle GPT # create partition with assigning drive letter PS C:\Users\Serverworld> New-Partition -DiskNumber 1 -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 D 16777216 495.94 MB Basic # format with NTFS PS C:\Users\Serverworld> Format-Volume -DriveLetter D -FileSystem NTFS -Force DriveLetter FriendlyName FileSystemType DriveType HealthStatus OperationalStatus SizeRemaining Size ----------- ------------ -------------- --------- ------------ ----------------- ------------- ---- D 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.
iSCSI Target ⇒ [iSCSITarget01] |
[7] |
Configure iSCSI Initiator on all Nodes and login to iSCSI Target, refer to here. |
Sponsored Link |
|