[Samba] Files in samba share cannot be deleted after copying failed.
Tao Wang
Tao_Wang at symantec.com
Mon Nov 29 20:31:13 MST 2010
Hello Volker,
Very appreciate your quick reply!
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.
sm_02:/var/log/samba # tailf log.__ffff_172.29.16.48 <----it's Windows XP client ip
[2010/11/29 22:22:53.758513, 3] smbd/oplock.c:894(init_oplocks)
init_oplocks: initializing messages.
[2010/11/29 22:22:53.758660, 3] smbd/oplock_linux.c:224(linux_init_kernel_oplocks)
Linux kernel oplocks enabled
[2010/11/29 22:22:53.758919, 3] smbd/process.c:1485(process_smb)
Transaction 0 of length 137 (0 toread)
[2010/11/29 22:22:53.758955, 3] smbd/process.c:1294(switch_message)
switch message SMBnegprot (pid 6339) conn 0x0
[2010/11/29 22:22:53.758980, 3] smbd/sec_ctx.c:310(set_sec_ctx)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2010/11/29 22:22:53.759084, 3] smbd/negprot.c:586(reply_negprot)
Requested protocol [PC NETWORK PROGRAM 1.0]
[2010/11/29 22:22:53.759114, 3] smbd/negprot.c:586(reply_negprot)
Requested protocol [LANMAN1.0]
[2010/11/29 22:22:53.759134, 3] smbd/negprot.c:586(reply_negprot)
Requested protocol [Windows for Workgroups 3.1a]
[2010/11/29 22:22:53.759154, 3] smbd/negprot.c:586(reply_negprot)
Requested protocol [LM1.2X002]
[2010/11/29 22:22:53.759173, 3] smbd/negprot.c:586(reply_negprot)
Requested protocol [LANMAN2.1]
[2010/11/29 22:22:53.759202, 3] smbd/negprot.c:586(reply_negprot)
Requested protocol [NT LM 0.12]
[2010/11/29 22:22:53.760935, 3] smbd/negprot.c:404(reply_nt1)
using SPNEGO
[2010/11/29 22:22:53.761291, 3] smbd/negprot.c:691(reply_negprot)
Selected protocol NT LM 0.12
[2010/11/29 22:22:53.763573, 3] smbd/process.c:1485(process_smb)
Transaction 1 of length 240 (0 toread)
[2010/11/29 22:22:53.763611, 3] smbd/process.c:1294(switch_message)
switch message SMBsesssetupX (pid 6339) conn 0x0
[2010/11/29 22:22:53.763632, 3] smbd/sec_ctx.c:310(set_sec_ctx)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2010/11/29 22:22:53.763662, 3] smbd/sesssetup.c:1435(reply_sesssetup_and_X)
wct=12 flg2=0xc807
[2010/11/29 22:22:53.763687, 2] smbd/sesssetup.c:1390(setup_new_vc_session)
setup_new_vc_session: New VC == 0, if NT4.x compatible we would close all old resources.
[2010/11/29 22:22:53.768766, 0] smbd/sesssetup.c:1378(shutdown_other_smbds)
shutdown_other_smbds: shutting down pid 12924 (IP ::ffff:172.29.16.48) <-----------------smbd is trying to shutdown 12924. It’s the problem pid.
[2010/11/29 22:22:53.773076, 0] smbd/sesssetup.c:1378(shutdown_other_smbds)
shutdown_other_smbds: shutting down pid 12924 (IP ::ffff:172.29.16.48)
[2010/11/29 22:22:53.774610, 3] smbd/sesssetup.c:1189(reply_sesssetup_and_X_spnego)
Doing spnego session setup
[2010/11/29 22:22:53.774648, 3] smbd/sesssetup.c:1231(reply_sesssetup_and_X_spnego)
NativeOS=[Windows 2002 Service Pack 2 2600] NativeLanMan=[Windows 2002 5.1] PrimaryDomain=[]
[2010/11/29 22:22:53.774695, 3] smbd/sesssetup.c:805(reply_spnego_negotiate)
reply_spnego_negotiate: Got secblob of size 40
[2010/11/29 22:22:53.774792, 3] libsmb/ntlmssp.c:65(debug_ntlmssp_flags)
Got NTLMSSP neg_flags=0xa2088207
[2010/11/29 22:22:53.777883, 3] smbd/process.c:1485(process_smb)
Transaction 2 of length 266 (0 toread)
[2010/11/29 22:22:53.777921, 3] smbd/process.c:1294(switch_message)
switch message SMBsesssetupX (pid 6339) conn 0x0
[2010/11/29 22:22:53.777943, 3] smbd/sec_ctx.c:310(set_sec_ctx)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2010/11/29 22:22:53.777968, 3] smbd/sesssetup.c:1435(reply_sesssetup_and_X)
wct=12 flg2=0xc807
[2010/11/29 22:22:53.777988, 2] smbd/sesssetup.c:1390(setup_new_vc_session)
setup_new_vc_session: New VC == 0, if NT4.x compatible we would close all old resources.
[2010/11/29 22:22:53.782911, 0] smbd/sesssetup.c:1378(shutdown_other_smbds)
shutdown_other_smbds: shutting down pid 12924 (IP ::ffff:172.29.16.48)
[2010/11/29 22:22:53.785677, 0] smbd/sesssetup.c:1378(shutdown_other_smbds)
shutdown_other_smbds: shutting down pid 12924 (IP ::ffff:172.29.16.48)
[2010/11/29 22:22:53.787067, 3] smbd/sesssetup.c:1189(reply_sesssetup_and_X_spnego)
Doing spnego session setup
[2010/11/29 22:22:53.787163, 3] smbd/sesssetup.c:1231(reply_sesssetup_and_X_spnego)
NativeOS=[Windows 2002 Service Pack 2 2600] NativeLanMan=[Windows 2002 5.1] PrimaryDomain=[]
[2010/11/29 22:22:53.787198, 3] libsmb/ntlmssp.c:747(ntlmssp_server_auth)
Got user=[] domain=[] workstation=[L-079218-A] len1=1 len2=0
sfs2_02:~ # date && smbstatus
Mon Nov 29 22:26:10 EST 2010
Registered MSG_REQ_POOL_USAGE
Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
Processing section "[share1]"
Processing section "[share11]"
Processing section "[share2]"
Samba version 3.5.3-8.2-2362-SUSE-CODE10
PID Username Group Machine
-------------------------------------------------------------------
0:12924 usr1 nogroup l-079218-a (::ffff:172.29.16.48)
0:3141 usr1 nogroup win7 (::ffff:10.200.114.6)
Service pid machine Connected at
-------------------------------------------------------
share2 0:12924 l-079218-a Mon Nov 29 22:13:41 2010
share2 0:3141 win7 Mon Nov 29 22:03:15 2010
Locked files:
Pid Uid DenyMode Access R/W Oplock SharePath Name Time
--------------------------------------------------------------------------------------------------
0:12924 1004 DENY_ALL 0x30196 WRONLY NONE /vx/fs2 meego-netbook-chromium-ia32-1.0-20100524.1.img.lock Mon Nov 29 22:14:03 2010
0:12924 1004 DENY_NONE 0x100081 RDONLY NONE /vx/fs2 . Mon Nov 29 22:13:44 2010
0:12924 1004 DENY_NONE 0x100081 RDONLY NONE /vx/fs2 . Mon Nov 29 22:13:44 2010
No locked files
But from smbstatus output, process 12924 is still there.
Thanks,
-----Original Message-----
From: Volker Lendecke [mailto:Volker.Lendecke at SerNet.DE]
Sent: 2010年11月29日 14:52
To: Tao Wang
Cc: samba at lists.samba.org
Subject: Re: [Samba] Files in samba share cannot be deleted after copying failed.
On Sun, Nov 28, 2010 at 10:25:43PM -0800, Tao Wang wrote:
> We figured out the reason. In our cluster environment,
> when the IP(Windows XP mounted the share by it) was down.
> It failed over to another box. This is not same as the IP
> is down and up on same box. It's the reason why smb cannot
> cleanup the share mode entry. The IP is up from another
> box.
>
> We tested it with IP down/up on same box. It can work.
That should still work I think. "reset on zero vc" should
kill all remaining daemons that serve the same client,
regardless of which server IP the client connected to.
Volker
More information about the samba
mailing list