locked
iSCSI not initially reconnecting after reboot. RRS feed

  • Question

  • Running server 2016.

    I have an ISCSI target that this server connects to. After a reboot, the drives do not automatically reconnect. If I disconnect them in ISCSI then reconnect, they appear fine.

    When the system comes up the iSCSI init properties Target tab says it is connected. The Volumes and Devices tab has 2 long strings that should be G:\ and H:\. I click Auto Configure and the strings go away. After I disconnect and reconnect, the drives show correctly in the Volumes and Devices tab.

    I cannot find anything in the event viewer that would point to what could cause this issue but I could be looking in the wrong place too.

    Any suggestions?

    Thanks

    Charles

    Monday, October 9, 2017 7:40 PM

Answers

  • I have already done that and it still will not connect on boot. Right now I have a scheduled task to restart the service to reconnect on reboot.

    powershell -command "Disconnect-IscsiTarget -NodeAddress 'iqn.xxx:vs.16' -Confirm:$false;Connect-IscsiTarget -NodeAddress 'iqn.xxx:vs.16'"

    Otherwise, it will never connect. It says it is but is not.

    • Marked as answer by CharlesWhite Tuesday, January 14, 2020 4:06 PM
    Thursday, September 20, 2018 6:49 PM

All replies

  • Hi Charles,

    Are there any differences between different targets?

    Could you please create the target again and check the results?

    If it still no clue, please try the workaround to do a check,

     Set the Local Adapter and Source IP Address in the Target portals (under the Discovery tab in the iscsi initiator).

    Reference thread:

    iscsi initiator target not reconnecting on reboot


    https://social.technet.microsoft.com/Forums/windowsserver/en-US/4b2420d6-0f28-4d12-928d-3920896f582d/iscsi-initiator-target-not-reconnecting-on-reboot?forum=winserverfiles

    Best Regards,
    Mary



    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, October 10, 2017 5:34 AM
  • Both the G:\ and H:\ drives are on the same target. The old backup server connected to those drives with no issue after reboot (Server 2008). This server has to be reconnected.

    I found that article and changed the settings to do the same thing and it still doesn't connect. I have also tried to make the iscsi service dependant on Lanman? I think that is the other work around I found.

    Charles

    Tuesday, October 10, 2017 12:52 PM
  • It seems as if it is trying to connect to the iSCSI target too soon. I setup a scheduled task to disconnect and then reconnect to the iSCSI target on startup and it works.

    Is there a logging feature that can be enabled so I can see what is happening to it?

    Charles

    Tuesday, October 10, 2017 7:45 PM
  • Hi Charles,

    On server 2008, there's the tracing logs we could enable for iSCSI initiator. But I haven't find on server 2016, maybe you could do a reference.


    https://social.technet.microsoft.com/Forums/windowsserver/en-US/a61cbaaa-4c9d-4614-8c5e-dc08c5b7c6f4/iscsi-initiator-event-logging?forum=winserver8gen

    Best Regards,

    Mary


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Proposed as answer by Mary Dong Tuesday, October 17, 2017 9:21 AM
    • Unproposed as answer by Mary Dong Wednesday, October 18, 2017 2:05 AM
    Wednesday, October 11, 2017 2:20 AM

  • Hi,
    Could the above reply be of help? If yes, you may mark it as answer, if not, feel free to feed back
    Best Regards,
    Mary


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, October 17, 2017 9:21 AM
  • This didn't help any. The log shows nothing on boot. And event viewer is empty. Disabling the ACK delay didn't fix it either.

    Tuesday, October 17, 2017 6:21 PM
  • Hi CharlesWhite,

    May I ask what's the current scenario for your issue?

    Was the problem fixed now?

    If the problem still has been fixed, please also check SAN policy on server. Make sure is online.

    Here is the checking settings.

    And if you still need to check the relate iscsi events, maybe you could check the iscsiPrt. Like the picture below:

    And we could check the event logs under application and services\microsoft\Widnows\iSCSITarget-service on iscsi target server.

    Best Regards,

    Mary


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, October 20, 2017 5:45 AM
  • When I goto diskpart, it says the same thing as your image. Offline shared. But the iScsi is currently connected and working. After a reboot, it says the same thing but does not work.

    After a reboot, nothing shows up in the event viewer under that log. In fact, nothing has shown up in that log since Oct 9 of this year when I manually stopped the service trying to trouble shoot this issue.

    Thank you

    Charles

    Friday, October 20, 2017 12:22 PM
  • Hi Charles,

    If it's offline shared, then after you reboot the server, it won't connect automatically. So I suggest you could change it online.

    For problem about nothing shows up in the event viewer, please also run the diagnosis tool on  iscsi initiator and target server to do a check:

    From a computer that is connected to the Internet:

    1. Click on the link below.
    http://support.microsoft.com/sdp/0B37559933303036303339343139F3
    2. Click on the Run button (recommended) to start the diagnostic process.
    3. Follow the onscreen instructions to run the diagnostic on this computer, or on a different computer

    Best Regards,

    Mary


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, October 23, 2017 9:16 AM
  • When the diskpart setting is set to Online All, it still doesn't connect the drives.

    Charles

    Monday, October 23, 2017 11:27 AM
  • Hi Charles,

    Have you also try to run the diagnosis tool to do a check?

    Best Regards,

    Mary


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, October 24, 2017 1:26 AM
  • I did the diag too. I did it with the Drives connected and with out. When the drives are connected I get this:

    ListInitiators
    -----------------------
    
    Microsoft iSCSI Initiator Version 10.0 Build 14393
    
    Initiators List:
        ROOT\ISCSIPRT\0000_0
    The operation completed successfully. 
    
    ListTargetPortals
    -----------------------
    
    Microsoft iSCSI Initiator Version 10.0 Build 14393
    
    Total of 2 portals are persisted:
    
        Address and Socket   : 10.110.1.10 3260
        Symbolic Name        : 
        Initiator Name       : ROOT\ISCSIPRT\0000_0
        Port Number          : 1
        Security Flags        : 0x0
        Version              : 0
        Information Specified: 0x3
        Header Digest        : None
        Data Digest          : None
        Login Flags          : 0x0
    
        Address and Socket   : 10.110.1.11 3260
        Symbolic Name        : 
        Initiator Name       : ROOT\ISCSIPRT\0000_0
        Port Number          : 1
        Security Flags        : 0x0
        Version              : 0
        Information Specified: 0x3
        Header Digest        : None
        Data Digest          : None
        Login Flags          : 0x0
    
    The operation completed successfully. 
    
    SessionList
    -----------------------
    
    Microsoft iSCSI Initiator Version 10.0 Build 14393
    
    Total of 1 sessions
    
    Session Id             : ffff8d82eb055010-4000013700000004
    Initiator Node Name    : iqn.1991-05.com.microsoft:backup.nhcs.local
    Target Node Name       : (null)
    Target Name            : iqn.1992-08.com.netapp:sn.x:vs.16
    ISID                   : 40 00 01 37 00 00
    TSID                   : 2a 01
    Number Connections     : 1
    
        Connections:
    
            Connection Id     : ffff8d82eb055010-3
            Initiator Portal  : 0.0.0.0/29396
            Target Portal     : 10.110.1.10/3260
            CID               : 01 00
    
        Devices:
            Device Type            : Disk
            Device Number          : 4
            Storage Device Type    : 7
            Partition Number       : 0
            Friendly Name          : NETAPP LUN C-Mode SCSI Disk Device
            Device Description     : Disk drive
            Reported Mappings      : Port 3, Bus 0, Target Id 0, LUN 1
            Location               : Bus Number 0, Target Id 0, LUN 1
            Initiator Name         : ROOT\ISCSIPRT\0000_0
            Target Name            : iqn.1992-08.com.netapp:sn.x:vs.16
            Device Interface Name  : \\?\scsi#disk&ven_netapp&prod_lun_c-mode#1&1c121344&0&000001#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
            Legacy Device Name     : \\.\PhysicalDrive4
            Device Instance        : 0x2
            Volume Path Names      : 
                                     G:\
    
            Device Type            : Disk
            Device Number          : 5
            Storage Device Type    : 7
            Partition Number       : 0
            Friendly Name          : NETAPP LUN C-Mode SCSI Disk Device
            Device Description     : Disk drive
            Reported Mappings      : Port 3, Bus 0, Target Id 0, LUN 2
            Location               : Bus Number 0, Target Id 0, LUN 2
            Initiator Name         : ROOT\ISCSIPRT\0000_0
            Target Name            : iqn.1992-08.com.netapp:sn.x:vs.16
            Device Interface Name  : \\?\scsi#disk&ven_netapp&prod_lun_c-mode#1&1c121344&0&000002#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
            Legacy Device Name     : \\.\PhysicalDrive5
            Device Instance        : 0x3
            Volume Path Names      : 
                                     H:\
    
    The operation completed successfully. 
    
    ListPersistentTargets
    -----------------------
    
    Microsoft iSCSI Initiator Version 10.0 Build 14393
    
    Total of 1 peristent targets
        Target Name           : iqn.1992-08.com.netapp:sn.x:vs.16
        Address and Socket    : 10.110.1.10 3260
        Session Type          : Data
        Initiator Name        : ROOT\ISCSIPRT\0000_0
        Port Number           : 1
        Security Flags        : 0x0
        Version              : 0
        Information Specified: 0x23
        Header Digest        : None
        Data Digest          : None
        Login Flags          : 0x0
        Username             : 
    
    The operation completed successfully. 
    
    ReportTargetMappings
    -----------------------
    
    Microsoft iSCSI Initiator Version 10.0 Build 14393
    
    Total of 1 mappings returned
        Session Id             : ffff8d82eb055010-4000013700000004
        Target Name            : iqn.1992-08.com.netapp:sn.x:vs.16
        Initiator              : ROOT\ISCSIPRT\0000_0
        Initiator Scsi Device  : \\.\Scsi3:
        Initiator Bus          : 0
        Initiator Target Id    : 0
            Target Lun: 0x100 <--> OS Lun: 0x1
            Target Lun: 0x200 <--> OS Lun: 0x2
    
    The operation completed successfully. 
    
    ListiSNSServers
    -----------------------
    
    Microsoft iSCSI Initiator Version 10.0 Build 14393
    
    
    The operation completed successfully. 


    When not connected I get this:

    ListInitiators
    -----------------------
    
    Microsoft iSCSI Initiator Version 10.0 Build 14393
    
    Initiators List:
        ROOT\ISCSIPRT\0000_0
    The operation completed successfully. 
    
    ListTargetPortals
    -----------------------
    
    Microsoft iSCSI Initiator Version 10.0 Build 14393
    
    Total of 2 portals are persisted:
    
        Address and Socket   : 10.110.1.10 3260
        Symbolic Name        : 
        Initiator Name       : ROOT\ISCSIPRT\0000_0
        Port Number          : 1
        Security Flags        : 0x0
        Version              : 0
        Information Specified: 0x3
        Header Digest        : None
        Data Digest          : None
        Login Flags          : 0x0
    
        Address and Socket   : 10.110.1.11 3260
        Symbolic Name        : 
        Initiator Name       : ROOT\ISCSIPRT\0000_0
        Port Number          : 1
        Security Flags        : 0x0
        Version              : 0
        Information Specified: 0x3
        Header Digest        : None
        Data Digest          : None
        Login Flags          : 0x0
    
    The operation completed successfully. 
    
    SessionList
    -----------------------
    
    Microsoft iSCSI Initiator Version 10.0 Build 14393
    
    Total of 1 sessions
    
    Session Id             : ffff8980c4a42010-4000013700000001
    Initiator Node Name    : iqn.1991-05.com.microsoft:backup2.nhcs.local
    Target Node Name       : (null)
    Target Name            : iqn.1992-08.com.netapp:sn.x:vs.16
    ISID                   : 40 00 01 37 00 01
    TSID                   : 2b 01
    Number Connections     : 1
    
        Connections:
    
            Connection Id     : ffff8980c4a42010-0
            Initiator Portal  : 10.110.1.61/194
            Target Portal     : 10.110.1.10/3260
            CID               : 01 00
    
    The operation completed successfully. 
    
    ListPersistentTargets
    -----------------------
    
    Microsoft iSCSI Initiator Version 10.0 Build 14393
    
    Total of 1 peristent targets
        Target Name           : iqn.1992-08.com.netapp:sn.x:vs.16
        Address and Socket    : 10.110.1.10 3260
        Session Type          : Data
        Initiator Name        : ROOT\ISCSIPRT\0000_0
        Port Number           : 1
        Security Flags        : 0x0
        Version              : 0
        Information Specified: 0x23
        Header Digest        : None
        Data Digest          : None
        Login Flags          : 0x0
        Username             : 
    
    The operation completed successfully. 
    
    ReportTargetMappings
    -----------------------
    
    Microsoft iSCSI Initiator Version 10.0 Build 14393
    
    Total of 1 mappings returned
        Session Id             : ffff8980c4a42010-4000013700000001
        Target Name            : iqn.1992-08.com.netapp:sn.x:vs.16
        Initiator              : ROOT\ISCSIPRT\0000_0
        Initiator Scsi Device  : \\.\Scsi3:
        Initiator Bus          : 0
        Initiator Target Id    : 0
    
    The operation completed successfully. 
    
    ListiSNSServers
    -----------------------
    
    Microsoft iSCSI Initiator Version 10.0 Build 14393
    
        
    The operation completed successfully. 


    Thank you

    Charles


    • Edited by CharlesWhite Tuesday, October 24, 2017 4:31 PM Readability
    Tuesday, October 24, 2017 4:30 PM
  • Hi Charles,

    Have you also try the  diagnosis tool I provided before to do a check? If not, could you please try to run?

    From a computer that is connected to the Internet:

    1. Click on the link below.
    http://support.microsoft.com/sdp/0B37559933303036303339343139F3
    2. Click on the Run button (recommended) to start the diagnostic process.
    3. Follow the onscreen instructions to run the diagnostic on this computer, or on a different computer

    Best Regards,

    Mary


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, October 26, 2017 5:57 AM
  • Hi Mary,

    The output above is from that tool.

    Charles

    Thursday, October 26, 2017 5:11 PM
  • Hi Charles,

    I believe that the output is part of result of the tool. And from the output, we can saw the following information.

    The connected log:

    The not connected log: it is empty in the device area

    For the tool, it will collect some event logs on our computer, then it compress those logs to a .cab file. it will display like below when we run it successfully

    Please click the send button to send the result to us. We will receive an email about the result. And you will see the result as following after uploaded

    As above, please try to run the tool again and upload the logs to us.
    Thanks for your cooperation.

    Best Regards,

    Mary


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, November 2, 2017 2:24 AM
  • I'm sorry. I misunderstood what you were asking. I have ran the tool again.

    SR 117101816512001

    Charles

    Thursday, November 2, 2017 6:23 PM
  • Hi Charles,

    We have checked the logs you provided. And we found the following information.
    11/2/2017 11:51:40 AM Information 67 iScsiPrt If Digest support selected for iSCSI Session, Will use Processor support for Digest computation.
    11/2/2017 11:51:59 AM Warning 107 MSiSCSI Error 0x00000003 initializing initiator shared secret.
    11/2/2017 11:52:04 AM Warning 121 MSiSCSI The firewall exception to allow Internet Storage Name Server (iSNS) client functionality is not enabled. iSNS client functionality is not available.
    11/2/2017 11:54:03 AM Error 103 MSiSCSI Timeout waiting for iSCSI persistently bound volumes. If there are any services or applications that use information stored on these volumes then they may not start or may report errors.

    According to those logs, we could try to perform the following steps to narrow down the problem.
    ---------------------------------------------------------
    1. Open registry.
    2. Navigating HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Disk.
    3. Edit or add the TimeOutValue entry to set it to 60 seconds in decimal format ((0000003c in hexadecimal). if the value is already 60 , then change the value to 90.
    4. Navigating HKLM\SYSTEM\CurrentControlSet\Control\Class\<the GUID of the disk> change the MaxRequestHoldTime to 20.
    5. Disable TCP Chimney Offload settings with the following commands
    -----------------------------------
    netsh int tcp set global chimney=disabled
    netsh int tcp set global rss=disabled

    Best Regards,

    Mary


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, November 6, 2017 9:36 AM
  • Hi Mary,

    Thanks for the reply.

    TimeOUtValue was already set to 60. I upped it to 90.

    MaxRequestHoldTime did not exist. I created it as a dword and set it to 20.

    I ran the 2 commands and they executed successfully.

    Reboot and it is still an issue.

    Monday, November 6, 2017 4:51 PM
  • Hi Charles,

    Thanks for your efforts on the case.

    At this moment, we may re-create and bind any targets that are not connecting at login to resolve the issue.

    Step 1 - Verify that the iSCSI target the iSCSI console and set Persistent connection.
    =====================================================
    a.  In Control Panel, double-click iSCSI Initiator, click the Target tab, then click a target in the Select a target list, and then click Log On.
    b.  Click to select the Automatically restore this connection when the system boots check box, and then click OK.

    Step 2 - Bind peristant volumes.
    ======================
    a.  In Control Panel, double-click iSCSI Initiator, open the Bound Volumes/Devices tab.
    b.  Click Bind All to bind all the persistent targets. Or, click Add, and then enter a drive letter or mount point to bind a specific target.

    Step 3 - Make the Server service dependent on MSiSCSI.
    ====================================
    Click Start, click Run, type cmd, and then press ENTER. Type the following command and then press ENTER.

    sc config LanManServer depend= MSiSCSI

    Best Regards,

    Mary


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, November 8, 2017 7:34 AM
  • Hi,

    Any updates for your issue?

    Look forward to your reply.

    Best Regards,

    Mary


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, November 10, 2017 2:07 AM
  • I got nothing different from this setup. It is still acting the same way. 

    Charles

    Thursday, November 16, 2017 2:42 PM
  • Mary,

    I have the same problem as Charles.

    The instructions you have provided appear to be from earlier versions of Windows, such as Windows Server 2003. Do you have anything more current.

    Maybe you got this information from the following article?

    https://support.microsoft.com/en-us/help/870964/file-shares-on-iscsi-devices-may-not-be-re-created-when-you-restart-th

    Tuesday, April 17, 2018 9:37 PM
  • I have the same issue.

    Newly installed Server2016

    windows update all items.

    add MPIO, enable iSCSI service

    Added Target Portals ip addresses of the SAN

    Refresh discovered targets

    Click Connect (takes a long time to connect)

    Volume shows up in Volume list and available.

    Reboot the server.

    Stuck on Reconnecting...

    • Proposed as answer by dougmania Tuesday, September 18, 2018 11:04 PM
    • Unproposed as answer by dougmania Tuesday, September 18, 2018 11:04 PM
    Tuesday, September 18, 2018 10:46 PM
  • OK after trying out different things, I think i got the solution that works for me. For some reason, if you have multiple network cards (as most servers do), the iscsi initiator would Timeout trying to reconnect trying different network cards.

    The solution would be to manually assign the network to your iscsi instead of auto discovering.

    Delete all the entries you have in your iscsi initiator and reboot. (start clean)

    1. open iSCSI initiator.

    2. Open Discovery portal Tab. Add your iSCSI target devices to Discover Portal

    3. Go to Targets Tab, Refresh to see your Targets with Status Inactive. 

    4. Select a target, click Properties.

    5. Add session, Add to favorites and choose multipath if applicable, click advanced...

    6. select Local adapter: Microsoft iSCSI Initiator

    Initiator IP: Your IP address of your iSCSI network

    Target portal IP: the IP of your Target device/node. 

    7. Add all your other nodes in this manner for all your target devices. If you are doing multipath you should have multiple sessions for each discovered target.

    8. Your targets should be connected once you OK'd out of all the windows.

    9. Done.

    Reboot, and everything should be online again as it should.

    • Proposed as answer by dougmania Tuesday, September 18, 2018 11:17 PM
    • Unproposed as answer by CharlesWhite Tuesday, January 14, 2020 4:06 PM
    Tuesday, September 18, 2018 11:17 PM
  • I have already done that and it still will not connect on boot. Right now I have a scheduled task to restart the service to reconnect on reboot.

    powershell -command "Disconnect-IscsiTarget -NodeAddress 'iqn.xxx:vs.16' -Confirm:$false;Connect-IscsiTarget -NodeAddress 'iqn.xxx:vs.16'"

    Otherwise, it will never connect. It says it is but is not.

    • Marked as answer by CharlesWhite Tuesday, January 14, 2020 4:06 PM
    Thursday, September 20, 2018 6:49 PM
  • Hi, I had the same issue, our workaround was to remove CHAP mutual authentication, after reboot, win server present iSCSI as inactive; after remove CHAP authentication it keeps connected
    Saturday, December 29, 2018 8:14 PM
  • thanks!

    OK after trying out different things, I think i got the solution that works for me. For some reason, if you have multiple network cards (as most servers do), the iscsi initiator would Timeout trying to reconnect trying different network cards.

    The solution would be to manually assign the network to your iscsi instead of auto discovering.

    Delete all the entries you have in your iscsi initiator and reboot. (start clean)

    1. open iSCSI initiator.

    2. Open Discovery portal Tab. Add your iSCSI target devices to Discover Portal

    3. Go to Targets Tab, Refresh to see your Targets with Status Inactive. 

    4. Select a target, click Properties.

    5. Add session, Add to favorites and choose multipath if applicable, click advanced...

    6. select Local adapter: Microsoft iSCSI Initiator

    Initiator IP: Your IP address of your iSCSI network

    Target portal IP: the IP of your Target device/node. 

    7. Add all your other nodes in this manner for all your target devices. If you are doing multipath you should have multiple sessions for each discovered target.

    8. Your targets should be connected once you OK'd out of all the windows.

    9. Done.

    Reboot, and everything should be online again as it should.


    Tuesday, January 14, 2020 10:50 AM
  • Step 3 - Make the Server service dependent on MSiSCSI. 

    ====================================
    Click Start, click Run, type cmd, and then press ENTER. Type the following command and then press ENTER.

    sc config LanManServer depend= MSiSCSI

    To save someone the headache I just went through, read the following before typing this command. 

    1. On the iSCSI servers
      1. Look at the Services.msc --> Server (LanManServer) --> Dependencies
      2. Find the Service Name for each dependent service
      .......Server SMB 2.xxx Driver is Srv2
      .......Security Account Manager is SamSs
      .......Microsoft iSCSI Initiator Service is MSiSCSI
      3. Start a Admin Command Window
      4. Type: sc config LanManServer depend= SamSs/Srv2/MSiSCSI/ <any other services found>
      5. Reboot computer
      6. Ensure the Server service is started
      https://support.microsoft.com/en-us/help/870964/file-shares-on-iscsi-devices-may-not-be-re-created-when-you-restart-th
      https://daniel.streefkerkonline.com/2010/11/25/server-lanmanserver-service-fails-to-start-on-server-2008-after-iscsi-config/
    Tuesday, February 4, 2020 4:26 PM