[Samba] Difference in Samba and CIFS interms of keeping the deleted files opened

Nikhil mnikhil at gmail.com
Mon Jul 20 10:44:49 MDT 2009


We have a CIFS server running on a NetApp server and a Solaris host running

When we mount both the filesystems to a Drive on a Windows using the net use
command and then try to run a java program which basically does nothing but
continuosly writes a data chunk to a file. On a side note, these same
filesystems are accessible on a Solaris (unix) host too.

When the java program is run and a file is being generated, I go to my unix
terminal and happen to delete the file generated by the java program.
Interestingly, there is an IOexception caught in the java program running on
the Windows machine, when the file is deleted on the CIFS based filesystem
(available on Solaris as a NFS filesystems) but there is no exception caught
when the filesystem happens to be Samba (available on Solaris as /var , a
regular partition).

I delete the file from Unix as the process demands, but also there is no way
to delete a in-use-file in Windows.

I would like to understand the differences in Samba and CIFS in this context
especially why is that so there is an IOexception for a CIFS based
filesystem but not on the samba filesystem. This is reproducible at will.
What could be wrong? What could be made to make samba filesystem also behave
the same way to throw exceptions (Exceptions are good than that not at all
knowing there is a file that is deleted but being still written onto.)

I would be willing to work and share the procedure to reproduce this
behaviour with anyone aware of the Samba/CIFS protocols.


More information about the samba mailing list