[Samba] "Delayed Write Failed" and other similar errors on Windows machines

Michael J. Welch, Ph.D. mjwelchphd at adelphia.net
Thu Feb 3 23:39:30 GMT 2005


I am experiencing an error which has been reported on the internet
since Samba 2.2.7 and Windows 2000. There are many suggestions as
to the cause of this problem, but no working solutions that I've been
able to find. I've already invested two weeks on this problem.

I was running Samba 3.0.7 under Mandrake for the last year, and
this problem was not present. Because Mandrake had other bugs,
and got worse upgrading from 10.0 to 10.1, I switched to SuSE 9.2
professional (boxed set). The problem does not manifest itself for
the first few hours after booting, then it shows up. The only way
I have found to get rid of the problem (for a short while) is to
reboot Suse, an obviously unworkable workaround. I am currently
running Samba 3.0.7 under SuSE, but I tried Samba 3.0.10 with no
difference.

My server is a Dual SMP Pentium III with 1GB RAM, a 60GB
Maxtor for the system drive, and a 3Ware raid and two 80GB Maxtor
drives in a RAID 1 configuration for the data drive. This is the
same machine the Mandrake was running on.

Here I have listed typical errors I get under the SuSE/Samba 3.0.7:

[An attempt to copy a file.]
The specified network name is no longer available.
[The file is not copied, but the name is placed into the directory.
A second attempt works normally, unless one backs out of the folder,
then comes back in again, in which case the failure is repeated.]

[An attempt to open a VS C++ project with no .NCB file. VS tries to
build another file, but fails during the write.]
Windows - Delayed Write Failed
Windows was unable to save all the data for the file
\\Server\icr\active\Copy of Ctrl 4-3-1-33\SKAN_Talk.ncb. The data has
been lost. This error may be caused by a failure of your
computer hardware or network connection. Please try to save
the file elsewhere.
[The file is partially created.]

[An attempt to delete a file after entering the folder.]
Cannot delete ~VC72: Cannot find the specified file.
Make sure you specify the correct path and file name.
[The file is deleted. An attempt to delete another file
without first exiting and reentering the folder succeeds
without any error.]

I also tried booting SuSE 9.2 DVD LIVE, and I opened /tmp,
then copied a file (vmlinuz) to it a half dozen times or more.
After the first time, I selected OVERWRITE each time.
Then I tried to delete the file, and got a message stating
that the file was in use and could not be deleted. After
restarting nmb/smb at the Samba server, the file could be deleted.
Note that copying and overwriting the file 2 or 3 times was not
enough. The file had to be overwritten at least half a dozen times
or so. Since this is a SuSE to SuSE test, it eliminates Windows as
the problem, and remember, the problem did not present itself
under Mandrake with the same Windows client machine.

Here I have listed some of the main things I have tried to fix it:

In Windows XP Pro SP1, I have tried setting the registry entries for:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\...
 Memory Management\SystemPages
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Lanmanserver\...
 Parameters\{EnableOplocks|EnableSecuritySignature)
but with no effect. I also made sure that there were adequate
permissions, as evidenced by the fact that the second attempts
would succeed.

In Samba, I changed/added the following and many other variations
with no effect:
[global]
 use sendfile = yes/no
 large readwrite = yes/no
 admin users = mike
 socket options = IPTOS_LOWDELAY TCP_NODELAY SO_KEEPALIVE \
   SO_RCVBUF=65536 SO_SNDBUF=65536
 server signing = disabled
 client signing = disabled
 level2 oplocks = yes/no
 locking = yes/no
[each share]
 create mask = 0660
 directory mask = 0774
 oplocks = no

I find it difficult to understand how this has been able to be a known
(and very serious) problem for many years without being addressed
and fixed. Surely someone must know the solution to this problem.
Is it Samba or is it SuSE? What do I have to do to fix it?
Any help will be greatly appreciated.

-- Mike
mjwelchphd at ekgreaders.com




More information about the samba mailing list