[Samba] Strange problem with file locking (so it seems)

Kris Kelley kkelley at simdesk.com
Wed Aug 28 13:58:00 GMT 2002


Hello all.  I'm wresting with a very weird smbfs quirk.  I realize smbfs
works independently of the Samba package (aside from smbmount's work),
so please let me know if I should be asking this question in another
forum.

We store email directories on a Win2K Server (SP2), with two email
servers (Red Hat 7.1, kernel 2.4.9-34) accessing the share.  One
specific directory has a curious problem where the last (most recent)
file in the directory is often seemingly "locked;" any attempt to move
or rename the file results in error messages like these:

mv: cannot unlink `1030570088.21768.server1,S=655 at 2,': Text file busy
mv: cannot remove `1030570088.21768.server1,S=655 at 2,': Text file busy

A strange thing is, if another message file enters this directory, the
lock problem passes on to that file; the original file is now "unlocked"
but the new file is "locked."  Even stranger is that if I try moving or
renaming the file using the second server, the lock problem clears up
temporarily; the file can now be freely moved or renamed from either
server, but later on the problem reappears with whatever the last file
is at that point.

There are no user programs that access these files from the Windows
side, and the programs that access the files via smb do not use any kind
of locking, I believe (I have asked to make sure).  Assuming they don't,
does anybody know of anything in the smbfs code for kernel 2.4.9 that
could be causing this, and what I can do to prevent it?  So far this
problem is only showing up in one directory, but that leaves open the
potential for it happening elsewhere.

If more info is needed, please let me know.  Thanks!

---Kris Kelley




More information about the samba mailing list