3

Whenever a bad volume (dying hard-disk, scratched CD, bad flash-drive/memory-card, etc.) is accessed, Windows tends to wait an excruciatingly long time (a minute or two?) before giving up and returning a read error.

Worse, Windows tends to practically hang while it attempts to read the bad media. For example, if you put a bad CD in and open the folder, it will try to read the files, but if it can’t the Explorer window with the CD folder open (and possibly other parts of Windows) will be inaccessible and frozen for a long time until Windows (finally) decides it can’t read the disc.

How can this timeout be reduced? (No, this has nothing to do with network-mapped drives.)

The closest I could find was mention of the TimeOutValue value in HKLM\SYSTEM\CurrentControlSet\Services\Disk, but there is little information on whether it applies to removable media or to non-server editions of Windows.

Synetech
  • 68,243
  • 36
  • 223
  • 356

1 Answers1

2

The Windows Storage Team updated this blog post in 2012 discussing the Disk timeout value, which is located at HKLM\SYSTEM\CurrentControlSet\Services\Disk like you mentioned.

Particularly relevant are these quotes (emphasis mine):

Why not just set it to 1 second? I don’t want to wait that long:

Keep in mind that the disk.sys timeout value is a global setting. If you were to set it to 1 second, this would mean that it would also have the effect of allowing only 1 second to spin up a drive which is asleep before reporting a timeout on the device.

It’s also important that this value be set high enough when using systems which are not only using SAN storage. For example, if you were to set the timeout value to 5 seconds on Windows Client operating systems where a SAN is not connected, you would likely see timeout errors which were not actually a problem, such as when a DVD or local disk are spinning up after being asleep.

With a little additional research, I came to the conclusion that this Registry entry:

  • is applicable to both client and server editions of Windows
  • affects the timeout period of all storage devices in the system, removable or fixed
  • is created by default in Vista (Ultimate), 7 (Ultimate), and Server 2008 R2 (it probably is in 8, but I haven't checked).
  • can be created in Server 2000, 2003, 2008 and 2012 (credit to @DarthAndroid)
    • This may mean that the key can be created in XP and have an effect on the time-out value.
nc4pk
  • 9,037
  • 14
  • 59
  • 71
  • Already saw that page (it’s what I was referring to in regards to the registry value in the first place). The problem is that your conclusion is specious and cannot be drawn as you stated it. If you check the *Properties* dialog for file `disk.sys`, you’ll see in the resources that it is called the "PnP Disk Driver", but under *Internal Name* and *Original File name*, it says **`scsidisk.sys`**. I highly doubt that removable media would be affected by this driver. Moreover, the page says nothing about whether it applies to non-server editions of Windows. – Synetech Jul 14 '13 at 21:29
  • 1
    @Synetech: "Moreover, the page says nothing about whether it applies to non-server editions of Windows" - "For example, if you were to set the timeout value to 5 seconds on ***Windows Client operating systems*** where a SAN is not connected, you would likely see timeout errors which were not actually a problem, such as when a DVD or local disk are spinning up after being asleep." – Karan Jul 15 '13 at 01:44
  • That seems inconsistent with other information about the value. For example they say that the timeout value is stored in that key, but it is not. I don’t have access to an installed Windows server system at the moment to check if it is set by default, but it is definitely not there in XP. Maybe it’s a Server 2003+ setting? Also, they repeatedly refer to SCSI drives in that page, so I’m not sure about the reference to DVDs. I suspect that this is one of those rarely-used/partially-undocumented settings that has little, inconsistent information. `:-(` – Synetech Jul 16 '13 at 20:00
  • 1
    @Synetech The key should work since at least Windows Server 2000, but it is not always created by default. If it doesn't exist, create it. IBM has it documented in Windows Servers 2000, 2003, 2008, and 2012. – Darth Android Jul 16 '13 at 22:00
  • Server isn’t much use to me. I already set it in XP on Saturday, so this weekend, I’ll check to see if it it actually works (though it might be tricky to tease out the behavior *on purpose*). Hopefully it will work for flash-drives, CD/DVD, and memory-cards on XP… – Synetech Jul 17 '13 at 00:18
  • I tested it on one old USB with some damaged files. Every time when the copying approach these bad files it hangs just infinitely (I waited more than 1 hour). So it does not work at least for USB media. – Alexander Samoylov Jan 02 '22 at 18:34