KB 10298 - Checking your persistent iSCSI targets

Introduction

When you Discover and Log On to an iSCSI target using MS iSCSI Initiator you have the option of making that volume persistent – available across host system re-boots. When the host system starts the iSCSI service will attempt to re-connect to any iSCSI targets that were configured as “persistent”.

Failure to re-connect

A failure to re-connect after a host system re-boot could be loosely grouped in to two categories; a working persistent device that fails to re-connect, or a newly configured persistent device that fails after the first re-boot.

Existing Persistent Devices

Under certain conditions a persistent device may not respond to reconnection attempts by the host system;

  • A change was made to the host system’s network configuration.
  • Network errors, or switch issues.
  • Physical cabling problems between the host system or the iSCSI target.

You can attempt to resolve these issues by trying to ping the iSCSI device from the host system:

A successful ping – the host system can reach the iSCSI target

C:\Admin>ping 10.0.0.22

Pinging 10.0.0.22 with 32 bytes of data:

Reply from 10.0.0.22: bytes=32 time<1ms TTL=64
Reply from 10.0.0.22: bytes=32 time<1ms TTL=64
Reply from 10.0.0.22: bytes=32 time<1ms TTL=64

Ping statistics for 10.0.0.22:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms


An unsuccessful ping – the host system can’t reach the iSCSI target

C:\Admin>ping 10.0.0.22

Pinging 10.0.0.22 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.

Ping statistics for 10.0.0.22:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),


New Persistent Devices

If you create a new iSCSI target connection and you want it to be persistent across host system re-boots be sure to check the Automatically restore this connection when the system boots check box when you Log On to the target:



The new target must appear on the Persistent Targets tab of the MS iSCSI initiator:



Use the Windows Disk Management panel to create a new disk and assign it a drive letter:



You can bind the new persistent target to the Windows disk you assigned it to on the Bound Volumes/Devices tab of the MS iSCSI initiator:






Advanced iSCSI Initiator Commands

If you have problems with a persistent target you can examine the iSCSI initiator configuration using the Windows command prompt to invoke the iscsicli utility.

The first thing to check the name of your initiator:

C:\Admin>iscsicli ListInitiators
Microsoft iSCSI Initiator Version 6.0 Build 6000

Initiators List:
Root\ISCSIPRT\00000
The operation completed successfully.


Next check is if the initiator is connected to the required iSCSI target:

C:\Admin>iscsicli ListTargets

Targets List:
iqn.1994-12.com.promise.81.83.65.55.1.0.0.20


Verify the Node Name on the iSCSI target to ensure it is the same as the one on this list.

Now check to see if there is a persistent target available:

C:\Admin>iscsicli ListPersistentTargets

Total of 1 peristent targets
Target Name : iqn.1994-12.com.promise.81.83.65.55.1.0.0.20
Address and Socket : 10.0.0.22 3260
Session Type : Data
Initiator Name : Root\ISCSIPRT\00000
Port Number : <Any Port>
Security Flags : 0x0
Version : 0
Information Specified: 0x20
Login Flags : 0x8
Username :


Note that the Initiator Name matches that returned by the first command.

Finally you can check if the persistent device you bound to the target is present:

C:\Admin>iscsicli ReportPersistentDevices

Persistent Volumes
"X:\"


The host system will try to connect to the iSCSI target that was configured as a persistent device so that it can mount drive X:.


Troubleshooting

If you do not see your iSCSI target listed using the CLI command ListPersistentTargets you should first ensure that the iSCSI target is reachable, and then try to create it again with the iSCSI Initiator. Check with the CLI again to see if the initiator has registered it before re-booting the host system to test the persistence of the volume.

If a persistent bound volume does not appear and the CLI command ReportPersistentDevices does not show a Drive letter but instead shows a link to a storage volume you can remove it using the CLI command ClearPersistentDevices and then Add the Volume again.

Example of bad persistent device:

C:\Admin>iscsicli ReportPersistentDevices
"\?\storage#volume#1&19f7e59c&0&gptpartition{bea947b0-cc1f-4485-82bd-d207c3c7f608}#{53f5630d-b6bf-11d0-94f2-00a0c91efb8b}"