[Samba] File "locking" problem continues.

Urban Widmark urban at teststation.com
Wed Sep 18 18:58:01 GMT 2002


On Wed, 11 Sep 2002, Kris Kelley wrote:

> 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

This is the server not allowing the move. Someone has the file open 
(possibly the linux smbfs client ...?).


> 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

If it only happens for one user, compare with other users. Perhaps he has 
some special rule, or is the last one in some list to be delivered to, or 
...


It could be something with multiple file openers. smbfs doesn't work all 
that well when multiple processes on different machines open the same 
file. Also, if a program on the linux box keeps the file open then it will 
be open (and busy/locked) on the windows machine.

This patch should be considered experimental. It changes how smbfs opens
files and if you can trigger the problem without risking people's email it
might be worth trying.

http://www.hojdpunkten.ac.se/054/samba/smbfs-2.4.19-rc1-ALL.patch.gz

But I would not recommend installing this on the servers without some
offline/off-hours testing first.

/Urban




More information about the samba mailing list