[Samba] File "locking" problem continues.
skunkworx at kingwoodcable.com
Wed Sep 11 17:06:00 GMT 2002
Hello, all. A while back I posted a question about an issue, but did
not get any replies. I understand this might not be something anybody
has a definite answer for, and I understand I may not be offering the
right information. If that is the case, please let me know what
information I can provide, and please don't hesitate to offer any
suggestions about what could be causing this problem.
My company's email system involves two linux-based (Red Hat 7.1) email
servers running a customized installation of Red Hat's release of kernel
2.4.9-34. Email files and folders are stored on a common, networked
file share, hosted by a machine running Windows 2000 Advanced Server,
SP2, and mounted via smbfs, using smbmount from Samba 2.2.4 on one
server, and smbmount from Samba 2.2.5 on the other.
About a month ago, the email inbox directory for one parituclar user
experienced a curious problem where the last (most recent) message file
in the directory became "locked." Any attempt to move or rename the
file resulted 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
Curiously, this problem only affected one of the email servers, SERVER1.
If I tried to move or rename the file using SERVER2, the "lock" would be
broken, and I could then move or rename the file using either server.
Even more curiously, while this "lock" was in place, if another message
file entered the directory, the "lock" would pass to the newer message
file, allowing SERVER1 to move or rename the older message file without
This problem was seen in only this one directory; the email directories
of all other users were not affected, and this user had no trouble
accessing his other email directories, besides the inbox.
A few days after this problem first appeared, SERVER1 was decommissioned
and replaced by a different machine. The newer machine runs almost the
same software, with the only significant difference being the new
SERVER1 uses smbmount from Samba 2.2.5 instead of 2.2.4. SERVER2
At first, the problem seemed to have disappeared along with the old
SERVER1, but now the problem is back. It is affecting the same folder
as before, and showing the same symptoms as before. Again, no other
directories are affected.
This morning, before using the lock-breaking trick with SERVER2, this
time I first tried moving the file locally, on the Windows box. I got a
"sharing violation" error, saying the file was in use. So, Windows saw
a problem, too, but again, moving the file with SERVER2 brok the "lock."
I am wondering if there is a process, perhaps related to smbfs, on
SERVER2 that is instigating this problem, but I am at a loss on what it
could be. The same programs (qmail and Courier IMAP) that access the
share are running on both servers, and we use a load balancer, so the
affected user is not accessing his directories from only one server or
the other. The only process that normally accesses these files on the
Windows box is our nightly back-up program, and any problem created by
that I imagine would affect more than just a single file in a single
If anybody has any clue how I can further investigate this issue, please
let me know. Thanks!
More information about the samba