How to Set Up iSCSI Initiator to Connect to SAN Storage on Windows Server 2016
iSCSI (Internet Small Computer Systems Interface) is a protocol that allows servers to access block-level storage devices over standard TCP/IP networks. Instead of requiring expensive Fibre Channel infrastructure, iSCSI enables Storage Area Network (SAN) connectivity over ordinary Ethernet, making enterprise-class shared block storage accessible to a wider range of environments. Windows Server 2016 includes a built-in iSCSI Initiator that allows it to connect to iSCSI targets (storage arrays or software iSCSI targets) and present the storage as locally attached disks to the operating system. This guide covers configuring the iSCSI Initiator, discovering targets, connecting with CHAP authentication, and optimizing the connection for production use.
In iSCSI terminology, the storage device that exports storage is called the target, and the server connecting to consume that storage is called the initiator. Each iSCSI device has a unique identifier called the IQN (iSCSI Qualified Name), formatted as iqn.yyyy-mm.reverse.domain:identifier. The iSCSI connection is made over TCP port 3260. For performance and redundancy, iSCSI deployments typically use dedicated Ethernet adapters and a separate storage VLAN isolated from general network traffic.
Starting the iSCSI Initiator Service
The Microsoft iSCSI Initiator service must be running before you can connect to targets. Enable and start it:
Start-Service MSiSCSI
Set-Service MSiSCSI -StartupType Automatic
Verify the service is running:
Get-Service MSiSCSI
Get the iSCSI Initiator name (IQN) of this server — you will need this to configure access control on the storage array:
Get-InitiatorPort
Discovering iSCSI Targets
There are two discovery methods: iSNS (Internet Storage Name Service) for automatic discovery in large environments, and manual target portal entry for simple setups. To manually add a target portal (the IP address and port of the iSCSI storage array):
New-IscsiTargetPortal -TargetPortalAddress "192.168.10.50" -TargetPortalPortNumber 3260
If the storage requires connecting from a specific initiator interface, specify the initiator IP:
New-IscsiTargetPortal -TargetPortalAddress "192.168.10.50" -InitiatorPortalAddress "192.168.10.10"
Discover all targets available at the portal:
Get-IscsiTarget
Register the iSNS server for automatic target discovery in large environments:
Set-WmiInstance -Namespace rootwmi -Class MSiSCSIInitiator_MethodClass -Arguments @{iSNSServer="192.168.10.5"}
Connecting to an iSCSI Target
Connect to a discovered target. Use the IQN obtained from Get-IscsiTarget:
Connect-IscsiTarget -NodeAddress "iqn.1992-08.com.netapp:sn.storage01:vs.1"
Connect and make the session persistent so it reconnects automatically after reboot:
Connect-IscsiTarget -NodeAddress "iqn.1992-08.com.netapp:sn.storage01:vs.1" -IsPersistent $true
View active iSCSI sessions:
Get-IscsiSession
Configuring CHAP Authentication
CHAP (Challenge Handshake Authentication Protocol) provides authentication between initiator and target. Configure one-way CHAP (target authenticates the initiator):
Set-IscsiChapSecret -ChapSecret "MySecretPassword123"
Connect to the target with CHAP credentials. The AuthenticationType parameter specifies the CHAP type:
Connect-IscsiTarget -NodeAddress "iqn.1992-08.com.netapp:sn.storage01:vs.1" -AuthenticationType ONEWAYCHAP -ChapUsername "initiator1" -ChapSecret (ConvertTo-SecureString "MySecretPassword123" -AsPlainText -Force) -IsPersistent $true
Configuring Multipath I/O (MPIO)
For production environments, configure multiple iSCSI sessions to the same target from different network adapters for redundancy and load balancing. First install the MPIO feature:
Install-WindowsFeature Multipath-IO
Add iSCSI support to MPIO:
Enable-MSDSMAutomaticClaim -BusType iSCSI
Connect to the same target a second time from a different initiator IP to create a second path:
Connect-IscsiTarget -NodeAddress "iqn.1992-08.com.netapp:sn.storage01:vs.1" -InitiatorPortalAddress "192.168.11.10" -TargetPortalAddress "192.168.11.50" -IsMultipathEnabled $true -IsPersistent $true
Initializing and Using iSCSI Disks
After connecting, the iSCSI LUN appears as a new disk. Initialize, partition, and format it:
Get-Disk | Where-Object {$_.BusType -eq "iSCSI"}
Initialize-Disk -Number 1 -PartitionStyle GPT -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume -FileSystem NTFS -NewFileSystemLabel "SANVolume" -Confirm:$false
Always use dedicated storage NICs for iSCSI traffic, ideally on a VLAN separate from your production traffic. Configure jumbo frames (9000 MTU) on both the storage NICs and the switch ports connecting to the SAN to maximize iSCSI throughput. Enable flow control on storage NICs to prevent packet loss under high load, which can cause significant iSCSI performance degradation.