3

On Windows 10 machine, right after iSCSI Initiator is setup to connect to drive rebooting of Windows takes ages. What usually was taking 5 seconds, it's now taking a minute. It doesn't matter if drive is mapped, but it's enough if iSCSI Initiator has connection to NAS. As soon as I remove that connection, and later on disable the service it gets back to fairly normal time.

I tried finding some option to enable quick dropping of iSCSI or something but weren't able to? Anyone had similar problem or knows solution to this? I've seen this since Windows 7, and it's still there in Windows 10. Most likely in server systems as well. But maybe there's no other way?

3 Answers 3

1

I know this is a very old thread but I was having the same slow restart issue with an ISCSI connection to a QNAP NAS using the Windows iSCSI Initiator.

I finally solved it using a shutdown script that runs Get-IscsiTarget | Disconnect-IscsiTarget -Confirm:$false

  • Save that command to a .ps1 file (C:\Scripts\Disconnect-QNAPIscsi.ps1)
  • Launch the Local Group Policy Editor (gpedit.msc)
  • Navigate to Computer Configuration > Windows Settings > Scripts (Startup/Shutdown) > Shutdown
  • Click on the PowerShell Scripts tab > Add > C:\Scripts\Disconnect-QNAPIscsi.ps1

My restart times went from over a minute to about 20 seconds.

1
  • While I don't do that anymore, it's a helpful trick. Thank you
    – MadBoy
    Jan 16 at 19:39
3

We noticed the same behaviour when we activated too much targets at our iSCSI Initiator. Although we used Windows Server 2012R2. But it was in fact that we had too much non-actual favourite targets at the corresponding list in iSCSI initiator. It was all because of frequent reconfigurations jobs we performed there. After removing redundant favourite targets, OS started booting faster. This might not be strictly because of misconfiguration in iSCSI initiator, but I would still recommend to check that. After all that phantom issues with windows iscsi initiator, I've come to believe anything :)

1
  • 1
    I have only 1 iSCSI connection, Synology NAS. Nothing fancy. It's newly built WIndows 10 system.
    – MadBoy
    Nov 2, 2016 at 11:07
2

Windows' default storage timeout time is 60 seconds. When that connection is not there, you get the timeout (regardless of whether you've mounted the disk or not - i.e. got a drive letter or mount point)

iSCSI is still looking for the disk, and thus waits 60 seconds and adds the delay to your boot.

This page may help you, but it's not Windows 10 specific (you're on Serverfault, not Superuser!)

https://blogs.msdn.microsoft.com/san/2011/09/01/the-windows-disk-timeout-value-less-is-better/

6
  • 1
    That's nice find. I expected knowledge on iSCSI topics on ServerFault more than SuperUser :) However setting it TimeOutValue to 0x0000005 (5) doesn't have any effect even after 2 reboots.
    – MadBoy
    Oct 31, 2016 at 16:35
  • On another note, why would it had to wait 60 seconds if iSCSI is there, connected.
    – MadBoy
    Oct 31, 2016 at 16:50
  • 1
    Just to clarify, as soon as it connects then things carry on, there's no perceivable wait. Basically the storage stack is probing it's list of known disks during boot to see if the various (local, fibre, iscsi whatever) disk(s) is(are) there and waiting for a reply. 60s has been a Microsoft default for a while, and perhaps it's inappropriate these days but during an HA event on a disk array or something, it's useful as it stops Windows throwing data away that could have otherwise been successfully written (You get 'Delayed Write Failed' errors when Windows times out and thows away a write)
    – Snellgrove
    Oct 31, 2016 at 16:59
  • 1
    I understand, hence not really sure why it behaves like it needs to timeout the 60 seconds on reboot when the connection is clearly there.
    – MadBoy
    Nov 2, 2016 at 11:08
  • 1
    Maybe I've misunderstood your original question. So you're saying it adds a delay when the NAS is up, iSCSI target online and the ethernet is all plugged in etc - i.e. good to go. How long does it take to connect if you manually disconnect when already booted?
    – Snellgrove
    Nov 2, 2016 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.