"text file busy" on cifs-mounted dir *doesn't* cause rsync error!

Wayne Davison wayned at samba.org
Thu Oct 19 03:30:52 GMT 2006


On Thu, Oct 19, 2006 at 03:28:56PM +1300, Jason Haar wrote:
> bash$ rsync /tmp/other.txt file.doc
> bash$ echo $?
> 0

Re-run the same command under strace:

  strace rsync -av /tmp/other.txt file.doc

That will show you the rename() call that rsync is making and what the
return value is.  If it is 0, there's nothing that rsync can do about
this.  If it is -1 with errno=ETXTBSY, rsync will try to unlink the
destination file.  If that returns -1 w/ETXTBSY, rsync will try to move
the destination file out of the way (you should run with at least 1
level of verbosity have rsync tell you when it does that).  If that
fails, the transfer should fail.

So, you should be able to see exactly what system calls rsync is trying
and what the system is returning via the strace output.  Let me know if
something looks amiss.  From your description of what filename gets
left, it does sound like something went wrong, but I'd guess that it
was the rename() not returning a failure.

..wayne..


More information about the rsync mailing list