How to disable NETWORK delayed writes in Windows XP ?
Posted on 2004-09-11
As software developer we have new problems with every OS release from Microsoft :-)
To be sure that the 24/7 apps we develop can recover from ANY problems - network loss, power loss, reboot, lock ups, etc we depend on Windows telling us the "truth". If we write 2k to a file on a network location and the OS says "OK, done" then we have to be sure that it really did the write properly.
So the main thing we do is make sure our customers all turned off delayed network writing. Runs a little be slower, but we can count on the data.
Under NT, you added:
UseWriteBehind REG_DWORD 0 to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Rdr\Parameters
As normal for Microsoft, under Win2k they change the way you disable delayed network writes to adding:
UtilizeNTCaching REG_DWORD 0 to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Lanmanworkstation\Parameters
So in testing apps under XP Pro, it I introduce a network loss on a machine we are writing to (by pulling the network plug) XP DOES a pop up to tell me data is lost and makes entries in the system event log - but it tells our apps that at least for a while the writes all were OK. On network reconnection we seek back to our last known good location and continue writing - but we either have garbage or nulls in the file where the OS never wrote (but told us it did).
How do you turn off delayed NETWORK writes under XP ? The NT and Win2k registry entries do not work. The MS Knowledge base (and here at EE) tell how to turn it off for the local drive - or to change opportunistic locking or disable the security signature. None of that stuff works to disable delayed writing to the network locations like you can under the older OS versions.