LEES, Cooper
2010-Feb-04 23:11 UTC
[Samba] Smbd Behaving Weirdly with Exported NFS CIFS Share points via SMBD [SEC=UNCLASSIFIED]
Hi all, Was not sure if this should go to this list or the technical, so I guess here :). I would just like to say I think Samba is one of AU?s best Open Source projects. Def the best thing out of ANU :P We are running Scientific Linux here @ ANSTO that mounts NFS filesystems from a Sun NFS Server (x4540) running Opensolaris. /home for example is a NFS mount and I use samba (Version 3.0.33-3.15.el5_4) to share the home directory?s so scientists here can map drives to their home directories from the Windows world. Recently, as the last few days people have been unable to get files from the NFS share points that I share via Samba. Nothing has really been changed on my NFS server and is a major shutdown of all my scientific nodes to restart the NFSD. My nodes are running the latest patches etc. from Scientific Linux (basically RedHat Linux / CentOS). I know sharing a mounted file system is dumb, but it has been working. Eventually (I know the Samba list might not like this) I will allow CIFS sharing directly from the Sun CIFS server ? Problem here is I enter the world of CIFS ACLs and UNIX file permissions and getting them to play nicely with one another is a night mate. Basically I can get through the filesystem, but once I try and copy a file locally it just sits there with the windows GUI copy window thing and I eventually have the end task on the Remote File listing Explorer window. Here is fstab?s mounting options for the NFS Mounts: nfs.server:/path/home /home nfs defaults,bg,intr,hard,noacl 0 0 Here is the conf I have on one of my Linux Nodes: [global] workgroup = ANSTO realm = ANSTO.GOV.AU netbios aliases = ABAQUS5 server string = Sun Cluster ABAQUS Node5 security = ADS wins server = x.x.x.x, x.x.x.x cups options = raw username map = /etc/samba/smbusers domain master = no [homes] comment = Home Directory path = /home/%S valid users = %S read only = No browseable = No [data1] comment = Data1 Directory path = /data1 read only = No [data2] comment = Data2 Directory path = /data2 read only = No [printers] comment = All Printers path = /var/spool/samba printable = Yes browseable = No ------------------ So I ran a test to try and tried to copy something from my nfs mounted home dir. It failed ? as described above. Here is a strace and a copy of the logs ... Seems there is trouble with file locking ... [crl at abaqus5 ~]$ sudo strace -p 5854 Password: Process 5854 attached - interrupt to quit fcntl(29, F_SETSIG, 0x23) = 0 fcntl(29, 0x400 /* F_??? */, 0x1) = -1 EINVAL (Invalid argument) fcntl(12, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=164, len=1}) = 0 fcntl(12, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=164, len=1}) = 0 fcntl(12, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=12132, len=1}) = 0 write(24, "\0\0\0\207\377SMB\242\0\0\0\0\210\1\310\0\0\0\0\0\0\0\0\0\0\0\0\3\0004\t".. ., 139) = 139 select(29, [5 24 28], [], NULL, {60, 0}) = 1 (in [24], left {59, 999000}) read(24, "\0\0\0H", 4) = 4 read(24, "\377SMB2\0\0\0\0\30\7\310\0\0\0\0\0\0\0\0\0\0\0\0\3\0004\te\0\0\233"..., 72) = 72 fstat(29, {st_mode=S_IFREG|0644, st_size=4201111, ...}) = 0 fcntl(12, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=12132, len=1}) = 0 fcntl(12, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=12132, len=1}) = 0 write(24, "\0\0\0D\377SMB2\0\0\0\0\210A\310\0\0\0\0\0\0\0\0\0\0\0\0\3\0004\t"..., 72) = 72 select(29, [5 24 28], [], NULL, {60, 0}) = 1 (in [24], left {59, 999000}) read(24, "\0\0\0F", 4) = 4 read(24, "\377SMB2\0\0\0\0\30\7\310\0\0\0\0\0\0\0\0\0\0\0\0\3\0004\te\0@\233"..., 70) = 70 stat(".", {st_mode=S_IFDIR|0700, st_size=75, ...}) = 0 write(24, "\0\0\0L\377SMB2\0\0\0\0\210A\310\0\0\0\0\0\0\0\0\0\0\0\0\3\0004\t"..., 80) = 80 select(29, [5 24 28], [], NULL, {60, 0}) = 1 (in [24], left {59, 999000}) read(24, "\0\0\0)", 4) = 4 read(24, "\377SMB\4\0\0\0\0\30\7\310\0\0\0\0\0\0\0\0\0\0\0\0\3\0\377\376e\0\200\233". .., 41) = 41 fcntl(12, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=12132, len=1}) = 0 fcntl(12, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=12132, len=1}) = 0 close(29) = 0 write(24, "\0\0\0#\377SMB\4\0\0\0\0\210\1\310\0\0\0\0\0\0\0\0\0\0\0\0\3\0\377\376"..., 39) = 39 select(29, [5 24 28], [], NULL, {60, 0}) = 1 (in [24], left {59, 991000}) read(24, "\0\0\0\224", 4) = 4 read(24, "\377SMB2\0\0\0\0\30\7\310\0\0\0\0\0\0\0\0\0\0\0\0\3\0004\te\0\300\233"..., 148) = 148 stat("scientific/openmpi-1.3-1.x86_64.rpm", {st_mode=S_IFREG|0644, st_size=4201111, ...}) = 0 fcntl(12, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=12132, len=1}) = 0 fcntl(12, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=12132, len=1}) = 0 write(24, "\0\0\0d\377SMB2\0\0\0\0\210A\310\0\0\0\0\0\0\0\0\0\0\0\0\3\0004\t"..., 104) = 104 select(29, [5 24 28], [], NULL, {60, 0}) = 1 (in [24], left {59, 998000}) read(24, "\0\0\0\236", 4) = 4 read(24, "\377SMB\242\0\0\0\0\30\7\310\0\0\0\0\0\0\0\0\0\0\0\0\3\0004\te\0\0\234"..., 158) = 158 stat("scientific/openmpi-1.3-1.x86_64.rpm", {st_mode=S_IFREG|0644, st_size=4201111, ...}) = 0 fcntl(12, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=12132, len=1}) = 0 open("scientific/openmpi-1.3-1.x86_64.rpm", O_RDONLY) = 29 flock(29, 0x60 /* LOCK_??? */ ---------- Tailing Logs from a Restart ... Shutting down NMB services: [ OK ] Starting SMB services: [ OK ] Starting NMB services: [ OK ] Netbios nameserver version 3.0.33-3.15.el5_4 started. Copyright Andrew Tridgell and the Samba Team 1992-2008 [2010/02/05 09:40:09, 0] nmbd/nmbd.c:terminate(58) Got SIGTERM: going down... [2010/02/05 09:40:09, 0] nmbd/nmbd.c:main(724) Netbios nameserver version 3.0.33-3.15.el5_4 started. Copyright Andrew Tridgell and the Samba Team 1992-2008 ==> smbd.log <=[2010/02/05 09:36:09, 0] smbd/server.c:main(944) smbd version 3.0.33-3.15.el5_4 started. Copyright Andrew Tridgell and the Samba Team 1992-2008 [2010/02/05 09:36:24, 0] lib/util_sock.c:write_data(562) write_data: write failure in writing to client x.x.x.x. Error Connection reset by peer [2010/02/05 09:36:24, 0] lib/util_sock.c:send_smb(761) Error writing 4 bytes to client. -1. (Connection reset by peer) [2010/02/05 09:40:09, 0] smbd/server.c:main(944) smbd version 3.0.33-3.15.el5_4 started. Copyright Andrew Tridgell and the Samba Team 1992-2008 [2010/02/05 09:41:37, 0] lib/util_sock.c:get_peer_addr(1224) getpeername failed. Error was Transport endpoint is not connected [2010/02/05 09:41:37, 0] lib/util_sock.c:write_data(562) write_data: write failure in writing to client x.x.x.x. Error Connection reset by peer [2010/02/05 09:41:37, 0] lib/util_sock.c:send_smb(761) Error writing 4 bytes to client. -1. (Connection reset by peer) [2010/02/05 09:41:42, 1] smbd/service.c:make_connection_snum(1042) shitbox ( x.x.x.x) connect to service crl initially as user crl (uid=732, gid=100) (pid 5854) [2010/02/05 09:43:04, 0] lib/util_sock.c:get_peer_addr(1224) getpeername failed. Error was Transport endpoint is not connected [2010/02/05 09:43:04, 0] lib/util_sock.c:write_data(562) write_data: write failure in writing to client x.x.x.x. Error Connection reset by peer [2010/02/05 09:43:04, 0] lib/util_sock.c:send_smb(761) Error writing 4 bytes to client. -1. (Connection reset by peer) [2010/02/05 09:43:04, 1] smbd/service.c:make_connection_snum(1042) m0657d ( x.x.x.x) connect to service data2 initially as user omz (uid=40359, gid=100) (pid 5888) [2010/02/05 09:43:22, 1] smbd/service.c:make_connection_snum(1042) shitbox ( x.x.x.x) connect to service crl initially as user crl (uid=732, gid=100) (pid 5889) [2010/02/05 09:43:52, 1] smbd/service.c:close_cnum(1239) shitbox ( x.x.x.x) closed connection to service crl ==> nmbd.log <=[2010/02/05 09:45:27, 0] nmbd/nmbd_namequery.c:query_name_response(109) query_name_response: Multiple (2) responses received for a query on subnet x.x.x.x for name ANSTO<1d>. This response was from IP x.x.x.x, reporting an IP address of x.x.x.x. [2010/02/05 09:45:27, 0] nmbd/nmbd_namequery.c:query_name_response(109) query_name_response: Multiple (3) responses received for a query on subnet x.x.x.x for name ANSTO<1d>. This response was from IP x.x.x.x, reporting an IP address of x.x.x.x. ==> smbd.log <=[2010/02/05 09:46:03, 1] smbd/service.c:close_cnum(1239) shitbox ( x.x.x.x) closed connection to service crl ----------- Has anyone had troubles like this before? Any workarounds, or things you would like me to try? Thanks, -- Cooper Ry Lees HPC / UNIX Systems Administrator - Information Management Services (IMS) Australian Nuclear Science and Technology Organisation T +61 2 9717 3853 F +61 2 9717 9273 M +61 403 739 446 E cooper.lees at ansto.gov.au www.ansto.gov.au <http://www.ansto.gov.au> Important: This transmission is intended only for the use of the addressee. It is confidential and may contain privileged information or copyright material. If you are not the intended recipient, any use or further disclosure of this communication is strictly forbidden. If you have received this transmission in error, please notify me immediately by telephone and delete all copies of this transmission as well as any attachments.