Configuring iSCSI Target Server Cluster role-Server 2016

Posted: December 28, 2016 in Windows Server

The iSCSI Target allows multiple servers to access stoarage on a Windows 2012 R2 simultaneously,and it can be added in to be made highly available through the Failover Cluster Manager

In this example we’ll be using 3 servers:

rd-sh.test.com (192.168.0.10) – Server with iSCSI virtual disk (iSCSI target)

iscsi-1.test.com (192.168.0.11)-Cluster member and iSCSI initiator (addedd disk from rd-sh.test.com)

iscsi-2.test.com (192.168.0.12)-Cluster member and iSCSI initiator (addedd disk from rd-sh.test.com)

Configuring iSCSI target (rd-sh.test.com):

Add-WindowsFeature fs-iscsitarget-server

Adding virtual iSCSI disk

New disk has F:letter

New-IscsiVirtualDisk -Path 'f:\storage.vhdx' -SizeBytes 59.8GB -ParentPath 'f:'
Add-IscsiVirtualDiskTargetMapping -TargetName 'mystorage' -Path 'f:\storage.vhdx'

Allowing access iscsi-1 (192.168.0.11) and iscsi-2 (192.168.0.12) to iSCSI virtual disk:

New-IscsiServerTarget -TargetName 'mystorage' -InitiatorIds Ipaddress:192.168.0.11,ipaddress:192.168.0.12

Configuring iscsi-1 and iscsi-2 servers (cluster members)

Connect to iSCSI initiator (rd-sh.test.com-192.168.0.10):

New-IscsiTargetPortal –TargetPortalAddress 192.168.0.10
$t=Get-IscsiTarget
Connect-IscsiTarget -NodeAddress $t.NodeAddress
Get-IscsiSession
$t=Get-IscsiSession
Register-IscsiSession -SessionIdentifier $t.SessionIdentifier

At this moment disk from rd-sh.test.com should be seen on both cluster members as offline:

get-disk

1.PNG

Initialize and format disk (on both cluster members)

Get-Disk | Where-Object IsOffline –Eq $True | Set-Disk –IsOffline $False
Initialize-Disk 1
New-Partition -DiskNumber 1 -UseMaximumSize -DriveLetter E
Format-Volume -DriveLetter E

Installing Cluster on iscsi-1 and iscsi-2 servers

From one of the future cluster member run:

invoke-command iscsi-1,iscsi-2 {Add-WindowsFeature fs-iscsitarget-server,Add-WindowsFeature failover-clustering -includemanagementtools}
New-Cluster 'iscsi_cluster' -Node iscsi-1,iscsi-2 -StaticAddress 192.168.0.21 -NoStorage

Add disk to Cluster

Get-ClusterAvailableDisk | Add-ClusterDisk

Add cluster computer account (isci_cluster) rights to create computer objects

Right click OU with computer account-Delegate Control

1.PNG

Object Types-Computer

241.png

1.PNG

Create custom task to delegate

241.png

Only the following objects in the folder-Computer Object-Create selected objects in this folder

241.png

General-Full Control

 

241.png

Adding iSCSI Target cluster role

 

Add-ClusteriSCSITargetServerRole -Storage 'Cluster Disk 1' -StaticAddress 192.168.0.22 -Name 'iscsi_target'

 

iscsi_target is netbios name which is used to access iSCSI clustered storage

 

1.PNG

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s