[Samba] CIFS mount problems

Marian Neagul marian at info.uvt.ro
Wed Aug 13 21:54:04 GMT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

	We have `some` problems related to the samba daemon, or possibly with
the Linux kernel CIFS filesystem.

	We have 2 server (for this example):
- - Storage Server, running Samba 3.0.28a on Ubuntu Linux (Samba version
3.0.28a-1ubuntu4.4) with ldap authentication.
- - Client, running Linux 2.6.24 as a XEN domU. This server mounts on
demand user home directory's from the Storage Server (via pam_mount)

Initially the mounts work normally but at some point all get
"disconnected", see below for an example.

Eg.

1. The Client

Kernel Version:
> root at blue:~# uname -a
> Linux blue.info.uvt.ro 2.6.24-19-xen #1 SMP Sat Jul 12 00:15:59 UTC 2008 x86_64 GNU/Linux

Mount information:
> root at blue:~# cat /proc/mounts | grep cifs
> //10.9.0.11/neagul /users/legacy/Pro03/neagul cifs rw,mand,relatime,unc=\\10.9.0.11\neagul,username=neagul,domain=TERRA,uid=12212,posixpaths,rsize=16384,wsize=57344 0 0
> //10.9.0.11/gligor /users/legacy/math/gligor cifs rw,mand,relatime,unc=\\10.9.0.11\gligor,username=gligor,domain=TERRA,uid=42023,posixpaths,rsize=16384,wsize=57344 0 0

Test case:
> root at blue:~# ls /users/legacy/Pro03/neagul
> ls: cannot access /users/legacy/Pro03/neagul: Input/output error
> root at blue:~# ls /users/legacy/math/gligor
> ls: cannot access /users/legacy/math/gligor: Input/output error

CIFS DebugData:
> root at blue:~# cat /proc/fs/cifs/DebugData
> Display Internal CIFS Data Structures for Debugging
> ---------------------------------------------------
> CIFS Version 1.52
> Active VFS Requests: 0
> Servers:
> 1) Name: 10.9.0.11  Domain: TERRA Mounts: 1 OS: Unix
>         NOS: Samba 3.0.28a      Capability: 0x80f3fd
>         SMB session status: 2
> 2) Name: 10.9.0.11  Domain: TERRA Mounts: 1 OS: Unix
> 	NOS: Samba 3.0.28a	Capability: 0x80f3fd
> 	SMB session status: 2
> Shares:
> 1) \\10.9.0.11\gligor Uses: 1 Type: NTFS DevInfo: 0x0 Attributes: 0x2f
> PathComponentMax: 255 Status: 1 type: 0
> 2) \\10.9.0.11\neagul Uses: 1 Type: NTFS DevInfo: 0x0 Attributes: 0x2f
> PathComponentMax: 255 Status: 1 type: 0

dmesg information:
> root at blue:~# dmesg | tail -11
> [31033.555969]  /build/buildd/linux-2.6.24/debian/build/custom-source-xen/fs/cifs/cifssmb.c: In QPathInfo (Unix) the path
> [31033.555972]  /build/buildd/linux-2.6.24/debian/build/custom-source-xen/fs/cifs/inode.c: error on getting revalidate info -5
> [31033.555974]  /build/buildd/linux-2.6.24/debian/build/custom-source-xen/fs/cifs/inode.c: cifs_revalidate - inode unchanged
> [31033.555977]  /build/buildd/linux-2.6.24/debian/build/custom-source-xen/fs/cifs/inode.c: CIFS VFS: leaving cifs_revalidate (xid = 910) rc = -5
> [31332.152628]  /build/buildd/linux-2.6.24/debian/build/custom-source-xen/fs/cifs/inode.c: CIFS VFS: in cifs_revalidate as Xid: 911 with uid: 0
> [31332.152635]  /build/buildd/linux-2.6.24/debian/build/custom-source-xen/fs/cifs/inode.c: Revalidate:  inode 0xffff88001b812cb8 count 1 dentry: 0xffff88001b817560 d_time 0 jiffies 4302758578
> [31332.152638]  /build/buildd/linux-2.6.24/debian/build/custom-source-xen/fs/cifs/inode.c: Getting info on
> [31332.152641]  /build/buildd/linux-2.6.24/debian/build/custom-source-xen/fs/cifs/cifssmb.c: In QPathInfo (Unix) the path
> [31332.152643]  /build/buildd/linux-2.6.24/debian/build/custom-source-xen/fs/cifs/inode.c: error on getting revalidate info -5
> [31332.152645]  /build/buildd/linux-2.6.24/debian/build/custom-source-xen/fs/cifs/inode.c: cifs_revalidate - inode unchanged
> [31332.152649]  /build/buildd/linux-2.6.24/debian/build/custom-source-xen/fs/cifs/inode.c: CIFS VFS: leaving cifs_revalidate (xid = 911) rc = -5

2. On the server side:

smb.conf
> [global]
>         idmap uid = 40000-50000
>         add user script = /usr/sbin/smbldap-useradd -m "%u"
>         delete user from group script = /usr/sbin/smbldap-groupmod -x "%u" "%g"
>         ldap group suffix = ou=Groups
>         hosts allow = 10.5.0., 10.5.1., 10.9.0.
>         client NTLMv2 auth = Yes
>         add machine script = /usr/sbin/smbldap-useradd -w "%u"
>         domain logons = Yes
>         socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
>         logon path =
>         netbios name = BLUE
>         ldap suffix = dc=info,dc=uvt,dc=ro
>         auth methods = guest, sam
>         utmp = Yes
>         bind interfaces only = Yes
>         preferred master = Yes
>         set primary group script = /usr/sbin/smbldap-usermod -g "%g" "%u"
>         idmap gid = 40000-50000
>         ldapsam:editposix = yes
>         ldap idmap suffix = ou=Idmap
>         passdb backend = ldapsam:ldap://xxx.xxx.xxx.ro/
>         workgroup = TERRA
>         interfaces = eth0.30, eth0.31, eth0.18
>         ldap user suffix = ou=Users
>         ldap admin dn = uid=root,dc=info,dc=uvt,dc=ro
>         hide unreadable = Yes
>         add user to group script = /usr/sbin/smbldap-groupmod -m "%u" "%g"
>         ldap passwd sync = Yes
>         add group script = /usr/sbin/smbldap-groupadd -p "%g"
>         ldap ssl = no
>         max log size = 2048
>         log file = /var/log/samba/log.%m
>         name resolve order = wins lmhosts host bcast
>         idmap backend = ldap:ldap://xxx.xxx.xxx.ro/
>         ldapsam:trusted = no
>         time server = Yes
>         log level = 3
>         dns proxy = No
>         server string = Samba Server
>         logon drive = Z:
>         os level = 200
>         guest account = pdcguest
>         wins support = Yes
>         ldap machine suffix = ou=Computers
>         client lanman auth = No
>         domain master = Yes
>         logon home =
> [homes]
>         comment = "Directoare de home"
>         valid users = %U
>         read only = No
> [netlogon]
>         browseable = No
>         path = /var/lib/samba/netlogon
>         guest ok = Yes

Some logs:
> root at dominatrix:/var/log/samba# tail -100  log.10.9.0.10
> [2008/08/13 23:20:57, 3] smbd/sec_ctx.c:set_sec_ctx(241)
>   setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
> [2008/08/13 23:21:57, 3] smbd/sec_ctx.c:set_sec_ctx(241)
>   setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
> [2008/08/13 23:22:57, 3] smbd/sec_ctx.c:set_sec_ctx(241)
>   setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
> [2008/08/13 23:23:57, 3] smbd/sec_ctx.c:set_sec_ctx(241)
>   setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
> [2008/08/13 23:24:57, 3] smbd/sec_ctx.c:set_sec_ctx(241)
>   setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
> [2008/08/13 23:25:57, 3] smbd/sec_ctx.c:set_sec_ctx(241)
>   setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
> [2008/08/13 23:25:57, 3] smbd/process.c:check_reload(1310)
>   Printcap cache time expired.
> [2008/08/13 23:25:57, 3] printing/pcap.c:pcap_cache_reload(117)
>   reloading printcap cache
> [2008/08/13 23:25:57, 0] printing/print_cups.c:cups_connect(69)
>   Unable to connect to CUPS server localhost:631 - Connection refused
> [2008/08/13 23:25:57, 3] printing/pcap.c:pcap_cache_reload(223)
>   reload status: error
> [2008/08/13 23:25:57, 3] printing/pcap.c:pcap_cache_reload(117)
>   reloading printcap cache
> [2008/08/13 23:25:57, 0] printing/print_cups.c:cups_connect(69)
>   Unable to connect to CUPS server localhost:631 - Connection refused
> [2008/08/13 23:25:57, 3] printing/pcap.c:pcap_cache_reload(223)
>   reload status: error
> [2008/08/13 23:26:57, 3] smbd/sec_ctx.c:set_sec_ctx(241)
>   setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
> [2008/08/13 23:27:29, 3] smbd/process.c:process_smb(1069)
>   Transaction 154 of length 248
> [2008/08/13 23:27:29, 3] smbd/process.c:switch_message(927)
>   switch message SMBsesssetupX (pid 28008) conn 0x0
> [2008/08/13 23:27:29, 3] smbd/sec_ctx.c:set_sec_ctx(241)
>   setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
> [2008/08/13 23:27:29, 3] smbd/sesssetup.c:reply_sesssetup_and_X(1253)
>   wct=13 flg2=0xd001
> [2008/08/13 23:27:29, 3] smbd/sesssetup.c:reply_sesssetup_and_X(1399)
>   Domain=[TERRA]  NativeOS=[Linux version 2.6.24-19-xen] NativeLanMan=[CIFS VFS Client for Linux] PrimaryDomain=[]
> [2008/08/13 23:27:29, 2] smbd/sesssetup.c:setup_new_vc_session(1209)
>   setup_new_vc_session: New VC == 0, if NT4.x compatible we would close all old resources.
> [2008/08/13 23:27:29, 3] smbd/sesssetup.c:reply_sesssetup_and_X(1414)
>   sesssetupX:name=[TERRA]\[marian]@[10.9.0.10]
> [2008/08/13 23:27:29, 3] smbd/sec_ctx.c:push_sec_ctx(208)
>   push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
> [2008/08/13 23:27:29, 3] smbd/uid.c:push_conn_ctx(358)
>   push_conn_ctx(0) : conn_ctx_stack_ndx = 0
> [2008/08/13 23:27:29, 3] smbd/sec_ctx.c:set_sec_ctx(241)
>   setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
> [2008/08/13 23:27:29, 3] smbd/sec_ctx.c:pop_sec_ctx(356)
>   pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
> [2008/08/13 23:27:29, 3] auth/auth.c:check_ntlm_password(221)
>   check_ntlm_password:  Checking password for unmapped user [TERRA]\[marian]@[10.9.0.10] with the new password interface
> [2008/08/13 23:27:29, 3] auth/auth.c:check_ntlm_password(224)
>   check_ntlm_password:  mapped user is: [TERRA]\[marian]@[10.9.0.10]
> [2008/08/13 23:27:29, 3] smbd/sec_ctx.c:push_sec_ctx(208)
>   push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
> [2008/08/13 23:27:29, 3] smbd/uid.c:push_conn_ctx(358)
>   push_conn_ctx(0) : conn_ctx_stack_ndx = 0
> [2008/08/13 23:27:29, 3] smbd/sec_ctx.c:set_sec_ctx(241)
>   setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
> [2008/08/13 23:27:29, 2] lib/smbldap.c:smbldap_open_connection(786)
>   smbldap_open_connection: connection opened
> [2008/08/13 23:27:29, 3] lib/smbldap.c:smbldap_connect_system(997)
>   ldap_connect_system: succesful connection to the LDAP server
> [2008/08/13 23:27:29, 3] smbd/sec_ctx.c:pop_sec_ctx(356)
>   pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
> [2008/08/13 23:27:29, 3] auth/auth_sam.c:check_sam_security(281)
>   check_sam_security: Couldn't find user 'marian' in passdb.
> [2008/08/13 23:27:29, 2] auth/auth.c:check_ntlm_password(319)
>   check_ntlm_password:  Authentication for user [marian] -> [marian] FAILED with error NT_STATUS_NO_SUCH_USER
> [2008/08/13 23:27:29, 3] smbd/error.c:error_packet_set(106)
>   error packet at smbd/sesssetup.c(1498) cmd=115 (SMBsesssetupX) NT_STATUS_LOGON_FAILURE
> [2008/08/13 23:27:29, 3] smbd/process.c:timeout_processing(1329)
>   timeout_processing: End of file from client (client has disconnected).
> [2008/08/13 23:27:29, 3] smbd/sec_ctx.c:set_sec_ctx(241)
>   setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
> [2008/08/13 23:27:29, 3] smbd/sec_ctx.c:set_sec_ctx(241)
>   setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
> [2008/08/13 23:27:29, 1] smbd/service.c:close_cnum(1230)
>   10.9.0.10 (10.9.0.10) closed connection to service gligor
> [2008/08/13 23:27:29, 3] smbd/connection.c:yield_connection(69)
>   Yielding connection to gligor
> [2008/08/13 23:27:29, 3] smbd/sec_ctx.c:set_sec_ctx(241)
>   setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
> [2008/08/13 23:27:29, 3] smbd/sec_ctx.c:set_sec_ctx(241)
>   setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
> [2008/08/13 23:27:29, 1] smbd/service.c:close_cnum(1230)
>   10.9.0.10 (10.9.0.10) closed connection to service neagul
> [2008/08/13 23:27:29, 3] smbd/connection.c:yield_connection(69)
>   Yielding connection to neagul
> [2008/08/13 23:27:29, 3] smbd/sec_ctx.c:set_sec_ctx(241)
>   setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
> [2008/08/13 23:27:29, 2] smbd/utmp.c:sys_utmp_update(419)
>   utmp_update: uname:/var/run/utmp wname:/var/log/wtmp
> [2008/08/13 23:27:29, 2] smbd/utmp.c:sys_utmp_update(419)
>   utmp_update: uname:/var/run/utmp wname:/var/log/wtmp
> [2008/08/13 23:27:29, 3] smbd/connection.c:yield_connection(69)
>   Yielding connection to
> [2008/08/13 23:27:29, 3] smbd/server.c:exit_server_common(768)
>   Server exit (normal exit)


	I fail to understand what causes this problems...


Thank You,

Marian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIo1f8VkAgQEvdxt4RAr+XAKCVl6xHuPpek6/CTU+lHUHTykxfcgCeNrwe
tQ6W4vHF03FN9MmHuwL/KnM=
=X+F0
-----END PGP SIGNATURE-----


More information about the samba mailing list