[Samba] Files in samba share cannot be deleted after copying failed.

Tao Wang Tao_Wang at symantec.com
Tue Nov 30 02:34:24 MST 2010


the smbd process is still there, and cannot remove the file from Windows.

The whole story is:
1. mount the cifs share with a IP on node1 from Windows XP client.
2. copy a big file from Windows XP to the share.
3. during the copying, the IP is down on node1 and up on node2.
4. copying failed.
5. cannot remove the file.

When reconnect to the share with same IP from Windows, the process 12924 is on node1, cannot be shutdown(ps output). 

Is it possible that smbd was trying to kill 12924 from node2 due to the IP is up on node2, but the process 12924 is actually on node1, So shutting down failed?


Thanks,
-----Original Message-----
From: Volker Lendecke [mailto:Volker.Lendecke at SerNet.DE] 
Sent: 2010年11月30日 17:17
To: Tao Wang
Cc: samba at lists.samba.org
Subject: Re: [Samba] Files in samba share cannot be deleted after copying failed.

On Mon, Nov 29, 2010 at 07:31:13PM -0800, Tao Wang wrote:
> We tested many times again. Found sometime it's work, but
> most times it's not work on our testing. Paste the smbd
> log(debug level 3) && smbstatus output.

Another interesting piece would be on the receiving side,
i.e. the log file of smbd with the process id 12924, which
in this case was the smbd holding the conflicting lock.

> But from smbstatus output, process 12924 is still there.

smbstatus output does not necessarily mean that the process
is still there. The authoritative source for the existence
of a process would be ps output or "kill -0 <pid>". We have
code to dynamically clean up the locking.tdb entries when a
process does not exist anymore and a subsequent client wants
to open a file. Is the smbstatus output your only indication
that the smbd is still there, or do you actually have the
conflict still in place?

With best regards,

Volker Lendecke


More information about the samba mailing list