Friday, November 21, 2008

Windows - Delayed Write Failed when copying to USB disks

Trouble transfering large files to USB devices? I've had quite some problems with Delayed Write Failed even after caching disabled, increasing the system page size, etc. when transfering large files to Western Digital USB 2.0 500MB and 2TB MyBook Devices (though this looks like an issue with USB storage devices in general).

Messages like these turn up in Even Viewer:

{Delayed Write Failed} Windows was unable to save all the data for the file . The data has been lost. This error may be caused by a failure of your computer hardware or network connection. Please try to save this file elsewhere.

or

Application popup: Windows - Delayed Write Failed : Windows was unable to save all the data for the file. The data has been lost. This error may be caused by a failure of your computer hardware or network connection. Please try to save this file elsewhere. 

To fix this enabled SoftRetry for USB transfers:

Start - run - cmd. Type:

  • reg add HKLM\SYSTEM\CurrentControlSet\Services\USB\EnSoftRetry /v Data /t REG_DWORD /d 1

Other hacks to get around this issue:

Look into HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management at LargeSystemCache and SystemPages.

Disable write caching on the disk (Right click the drive letter -  Properties - Hardware - Select the Disk - Properties - Policies - Optimize for quick removal).

Make sure you monitor errors under Start - Run - eventvwr.msc -> System.

2 comments:

openid said...

Hey. Just wondering. If you try it in any *nix, does it give you a kernel/dmesg error which says write request/device IO failed?

cmihai said...

Less often, but yes. If you transfer large chunks of data it seems to happen quite often if USB devices.