Fix it now
iScsiPrt events in the System log are the initiator complaining about its session, not about your data. Microsoft’s iSCSI connectivity guidance treats events 20 and 27 as the initiator failing to connect and event 9 as the target failing to respond. On a clustered node any of them is enough to fail a disk resource over while the array is fine.
Get-Service MSiSCSI
Get-IscsiSession
Get-IscsiConnection
Get-MSDSMAutomaticClaimSettings
Test-NetConnection <portal-ip> -Port 3260
- Compare the session and connection counts against a node that is behaving. A node with fewer sessions is the whole finding.
- Confirm iSCSI traffic is on its own adapters. Microsoft’s guidance is that iSCSI, management and client networks are segregated and correctly routed, and that clustered machines route iSCSI through dedicated adapters.
- Make MTU consistent end to end, on the NIC, every switch in the path and the array:
netsh interface ipv4 set subinterface "<Name>" mtu=9000 store=persistent - Reconnect the target persistently:
Connect-IscsiTarget -NodeAddress <target> -TargetPortalAddress <ip> -TargetPortalPortNumber 3260 -IsPersistent $true - If the disks are there but shares or roles come up before them after a reboot, set the dependency Microsoft documents:
sc configuration LanmanServer depend= MSiSCSI, and set the critical services to Automatic (Delayed Start).
Where sessions are being reset repeatedly, Get-IscsiSession | Remove-IscsiSession and a clean reconnect is the documented way to start from a known state. Do it in a window: it disconnects the LUNs.
If the session count is right and stable for a working day, you can stop here. The next section covers what an iSCSI session actually is and which layer keeps tearing it down.
Why it happens
iSCSI wraps SCSI commands in TCP. The initiator logs in to a target portal on port 3260, negotiates a session, and from then on every disk operation travels over that connection as though it were a cable. A session can carry more than one connection, and with MPIO you get several sessions across several paths, so losing one is survivable.
Because the transport is ordinary TCP over ordinary Ethernet, everything that hurts TCP hurts your disks. A spanning tree recalculation, a switch reboot, an MTU that only bites on large frames, a routing change that sends storage traffic through a firewall: all of them tear down sessions, and the initiator’s response is to retry. The events are the sound of it retrying.
Microsoft’s own iSCSI connectivity guidance names events 9, 20, 27 and 39 as the iSCSI set, with 20 and 27 grouped as the initiator failing to connect and 9 as the target failing to respond in time. The other iScsiPrt IDs you will see – including 1, 5, 10 and 34 – have no published message text at all, so treat the number as a marker of when the session broke and diagnose from the session state, the path count and the network.
The initiator is using the wrong interface
You have this one if Connection failures on a node with several NICs, and storage traffic showing up on the management network in the counters.
- Segregate the networks: iSCSI on its own adapters and subnet, separate from management and client traffic.
- In the iSCSI Initiator control panel, connect each path explicitly, pairing each storage NIC’s initiator IP with the array portal in the same subnet.
- Remove discovery portal entries that point at the management network so the initiator stops trying that route.
- Confirm the resulting sessions with
Get-IscsiSessionandGet-IscsiConnection.
Storage and management sharing one subnet is the most common cause of unexplained iSCSI instability in small deployments.
MTU is mismatched somewhere along the path
You have this one if The session establishes and small operations work, then it drops as soon as real I/O starts.
- Decide one MTU for the whole storage path and set it identically on the NIC, every switch and the array.
- Set it persistently on Windows:
netsh interface ipv4 set subinterface "<Name>" mtu=9000 store=persistent - If any hop cannot be changed, put the whole path back to the standard MTU rather than leaving it half configured.
- Watch the log for a full working day after the change.
MPIO is not claiming the devices
You have this one if The same LUN appears more than once, or a path loss removes the disk instead of being absorbed.
- Check what the DSM is claiming:
Get-MSDSMAutomaticClaimSettings - Confirm each LUN shows the expected path count with
mpclaim -s -d. - Apply the load balance policy the array vendor supports, and confirm the DSM in use is theirs or Microsoft’s, not a mixture.
- Retest a deliberate path failure in a window rather than assuming.
The disk timeout is too short for the outages this network produces
You have this one if Sessions do recover, but volumes go offline or cluster disks fail over before they do.
- Read the current value at
HKLM\SYSTEM\CurrentControlSet\Services\disk, valueTimeOutValue. - Microsoft recommends 179 or larger for iSCSI-attached disks.
- Do not go past 179. At 180 seconds the system logs event ID 17 and restarts the machine, which is a much worse outcome than a slow LUN.
- Reboot and confirm the value took effect before testing a deliberate path failure.
Full reference
Reading the pattern rather than the number
| Pattern in the log | Where to look |
|---|---|
| Failures at boot that never recover | Portal address, VLAN, firewall on 3260, or credentials |
| A drop followed by a recovery minutes later | The switch, NIC or cable on that path |
| Events clustered around backups | The array or the network is saturated at that time |
| Only one of several paths logging errors | One NIC, one switch port or one array port |
| All paths dropping together | The array, the whole storage VLAN, or the initiator configuration |
| Cluster disk resources failing over at the same timestamps | Disk timeouts are shorter than the outages the network produces |
The events Microsoft does name
| Event | How Microsoft groups it |
|---|---|
| 20 and 27 | Initiator failed to connect: review target IP addresses, reset sessions, fix mappings |
| 9 | Target did not respond |
| 39 | Listed with the iSCSI events and errors set |
| 7 | The device has a bad block – a hardware fault, logged by the disk stack rather than the initiator |
| 153 | The I/O operation at the logical block address was retried |
| 157 | The disk has been surprise removed |
The last three are not iSCSI events at all, but they arrive in the same window and are what turn a session problem into a storage incident. If you are seeing 157 alongside iSCSI events, the disk did not vanish – the session did, and the storage stack reported the consequence.
Commands worth having on the node
| Command | What it does |
|---|---|
Get-IscsiSession |
Lists the current sessions, including whether each is persistent |
Get-IscsiConnection |
Lists the connections underneath those sessions |
Get-IscsiSession | Remove-IscsiSession |
Tears down every session so you can reconnect from a clean state |
Connect-IscsiTarget -NodeAddress <t> -TargetPortalAddress <ip> -TargetPortalPortNumber 3260 -IsPersistent $true |
Connects a target and makes the connection survive a reboot |
Get-MSDSMAutomaticClaimSettings |
Shows which bus types the Microsoft DSM is claiming automatically |
mpclaim -s -d |
Lists each disk and its path count |
sc configuration LanmanServer depend= MSiSCSI |
Makes the Server service wait for the iSCSI initiator, so shares do not come up before their storage |
Ordering at boot, which is a separate problem
A node whose iSCSI storage is fine during the day can still come back from a reboot with missing shares, failed roles or an initiator UI showing a stale address. Microsoft’s documented remedies are the service dependency above and setting the services that depend on iSCSI storage to Automatic (Delayed Start). This is worth doing pre-emptively on any clustered node that serves files from an iSCSI LUN, because the symptom – shares that disappear after a restart – looks nothing like a storage fault.
When the network is clean and it still drops
- Confirm the target’s own logs show the login attempts arriving. An initiator that never reaches the array and an array that rejects the login look identical from Windows.
- Confirm the initiator name on the node matches what the array expects. Renaming or rebuilding a node changes it.
- Check the array vendor’s supported combination of NIC firmware, driver and array firmware, and move to it as a set rather than one component at a time.
- If clustered disks fail over during recoveries that are otherwise clean, the disk
TimeOutValueis the setting to look at – and 179 is the ceiling, not a starting point to exceed.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
Event ID 1 |
Logged by the iSCSI initiator port driver against a target. Microsoft publishes no message text for this ID; diagnose from the session and connection state and the path to the portal | not published by the vendor |
Event ID 34 |
Another iScsiPrt entry with no published message text. Treat it as a marker of when the session changed state and correlate it with the network and the array’s own log | not published by the vendor |
Event ID 5 |
An iScsiPrt entry with no published message text; read it together with the session state rather than on its own | not published by the vendor |
Event ID 10 |
An iScsiPrt entry with no published message text. The documented iSCSI event set is 9, 20, 27 and 39, so use those and the session data for diagnosis | not published by the vendor |
Confirm the fix worked
Get-IscsiSessionshows the expected number of sessions, each marked persistent.mpclaim -s -dreports the full path count on every LUN.- A deliberate cable pull in a maintenance window leaves I/O running, and the path returns when it is reconnected.
- A full node reboot brings back every LUN, share and role without manual intervention.
- The System log records no new iScsiPrt entries across a day of production.
Questions people ask about this
Do I need to buy anything to make iSCSI stable?
No. The Microsoft iSCSI Initiator and MPIO are included with Windows Server, and every fix on this page is configuration. If someone is proposing a purchase for this, ask precisely what it changes.
Do I still need MPIO if the array has redundant controllers?
Yes. Redundancy on the array does nothing for the initiator unless the initiator has more than one path and something to arbitrate between them. Without it, Windows sees the same LUN twice.
Should storage traffic have its own VLAN?
Microsoft’s guidance is that iSCSI, management and client networks are segregated and correctly routed, and that clustered machines use dedicated adapters for iSCSI. Separate physical ports where you can.
An occasional reconnect – is that acceptable?
One after a planned switch reboot is expected. A steady trickle is a fault you have not found, and it will eventually land during a write that matters.
Why does the initiator UI show an old IP address?
Microsoft lists that as a known issue with no functional effect. Confirm the actual sessions with Get-IscsiSession rather than trusting the dialog.
