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

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Nov 30 03:01:13 MST 2010


On Tue, Nov 30, 2010 at 01:34:24AM -0800, Tao Wang wrote:
> 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?

Sure, that would be a possible reason. But something looks
not right in your setup. After a failover, locking.tdb
should be empty. When smbd is started on node2 after the
failover is done, it will open the locking.tdb file with
CLEAR_IF_FIRST. This means, all entries which are by
definition empty are wiped out. Alternatively, if you are
running ctdb, then smbd should have either been able to send
the kill message to the other node, or the code should have
discovered that process 12924 is not around anymore and it
should have removed the conflicting entry from the
locking.tdb entry.

With best regards,

Volker Lendecke


More information about the samba mailing list