PDA

View Full Version : cannot mount cifs share using sles 10 sp4



berndgsflinux
04-May-2012, 17:10
Hi,

i cannot mount cifs shares on a NAS,trying from two sles 10 sp4 boxes (kernel 2.6.16.60-0.93.1-smp, 64bit, cifs-mount-3.0.36-0.13.20.1). I know that i could one or two months ago. The command i issue is:

======================================
pc52974:~ # mount -t cifs //nas/idg-2 /mnt/idg-2/ -o username=bernd.lentes,workgroup=scidom,rw
Password:
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

In my syslog appears (after echo 1 > /proc/fs/cifs/cifsFYI to make the output more verbose):
fs/cifs/cifsfs.c: Devname: //nas/idg-2 flags: 64
fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 7 with uid: 0
fs/cifs/connect.c: Domain name set
fs/cifs/connect.c: Username: bernd.lentes
fs/cifs/connect.c: UNC: \\nas\idg-2 ip: 146.107.8.8
fs/cifs/connect.c: Existing tcp session with server found
fs/cifs/connect.c: Existing smb sess found (status=1)
fs/cifs/connect.c: file mode: 0x7f7 dir mode: 0x1ff
fs/cifs/transport.c: For smb_command 117
fs/cifs/transport.c: Sending smb of length 74
fs/cifs/connect.c: rfc1002 length 0x42
fs/cifs/connect.c: disk share connection
fs/cifs/connect.c: Tcon flags: 0x1
fs/cifs/connect.c: CIFS Tcon rc = 0
fs/cifs/cifssmb.c: In QFSDeviceInfo
fs/cifs/transport.c: For smb_command 50
fs/cifs/transport.c: Sending smb of length 68
fs/cifs/connect.c: rfc1002 length 0x44
fs/cifs/cifssmb.c: In QFSAttributeInfo
fs/cifs/transport.c: For smb_command 50
fs/cifs/transport.c: Sending smb of length 68
fs/cifs/connect.c: rfc1002 length 0x50
fs/cifs/cifssmb.c: In GetSrvInodeNum for
fs/cifs/transport.c: For smb_command 50
fs/cifs/transport.c: Sending smb of length 74
fs/cifs/connect.c: rfc1002 length 0x27
fs/cifs/connect.c: invalid transact2 word count
fs/cifs/netmisc.c: !!Mapping smb error code 87 to POSIX err -22 !!
fs/cifs/cifssmb.c: error -22 in QueryInternalInfo
fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid = 7) rc = -22
CIFS VFS: cifs_mount failed w/return code = -22
===============================

Trying the same from a SLES 10 SP2 box works fine.

Any ideas ?


Bernd

enovaklbank
09-May-2012, 14:10
I found this: http://lists.samba.org/archive/linux-cifs-client/2007-November/002470.html

the problem seems to be quite similar...

Maybe you could try the suggestion from there:
# echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled

berndgsflinux
09-May-2012, 18:28
I found this: http://lists.samba.org/archive/linux-cifs-client/2007-November/002470.html

the problem seems to be quite similar...

Maybe you could try the suggestion from there:
# echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled

Hi,

unfortunately this didn't help. But i did "echo 1 > /proc/fs/cifs/cifsFYI to make the output more verbose. Dmesg says:

=================
fs/cifs/cifsfs.c: Devname: //146.107.8.8/idg-2 flags: 64
fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 23 with uid: 0
fs/cifs/connect.c: Domain name set
fs/cifs/connect.c: Username: bernd.lentes
fs/cifs/connect.c: UNC: \\146.107.8.8\idg-2 ip: 146.107.8.8
fs/cifs/connect.c: Existing tcp session with server found
fs/cifs/connect.c: Existing smb sess found (status=1)
fs/cifs/connect.c: file mode: 0x7f7 dir mode: 0x1ff
fs/cifs/transport.c: For smb_command 117
fs/cifs/transport.c: Sending smb of length 90
fs/cifs/connect.c: rfc1002 length 0x42
fs/cifs/connect.c: disk share connection
fs/cifs/connect.c: Tcon flags: 0x1
fs/cifs/connect.c: CIFS Tcon rc = 0
fs/cifs/cifssmb.c: In QFSDeviceInfo
fs/cifs/transport.c: For smb_command 50
fs/cifs/transport.c: Sending smb of length 68
fs/cifs/connect.c: rfc1002 length 0x44
fs/cifs/cifssmb.c: In QFSAttributeInfo
fs/cifs/transport.c: For smb_command 50
fs/cifs/transport.c: Sending smb of length 68
fs/cifs/connect.c: rfc1002 length 0x50
fs/cifs/cifssmb.c: In GetSrvInodeNum for
fs/cifs/transport.c: For smb_command 50
fs/cifs/transport.c: Sending smb of length 74
fs/cifs/connect.c: rfc1002 length 0x27
fs/cifs/connect.c: invalid transact2 word count
fs/cifs/netmisc.c: !!Mapping smb error code 87 to POSIX err -22 !!
fs/cifs/cifssmb.c: error -22 in QueryInternalInfo
fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid = 23) rc = -22
CIFS VFS: cifs_mount failed w/return code = -22
=========================

Any ideas ?


Bernd

enovaklbank
10-May-2012, 08:33
This output does not seem to differ from what you already posted here. You used IP address this time, though.
What could be more helpful is the output from the SP2 machine. And see how the lines differ.

If it really worked with SP2, you could compare the /etc/nsswitch.conf , /etc/hosts files from the SP2 and SP4 boxes.
If it really worked with SP4 1-2 months ago, I'd check if cifs-mounts package changed in the last months (rpm -q --last) and how (rpm -q --changelog cifs-mounts) and if that's relevant. But it may be the kernel, though...
(I had a long battle with Samba last week, where on a day, a valid samba configuration stopped working. Krb5 seemed to be guilty, and although I hate using not core SLES software, installed the krb5 package from opensuse 11.4 which fixed everything. So somethimes we must hack, unfortunately.)

But a packet capture with tcpdump could be more useful. Again, both SP2 and SP4, and see where it goes wrong.

berndgsflinux
11-May-2012, 17:40
This output does not seem to differ from what you already posted here. You used IP address this time, though.
What could be more helpful is the output from the SP2 machine. And see how the lines differ.

here is the output from the SP2-Box:

fs/cifs/cifsfs.c: Devname: //nas/idg-2 flags: 64
fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 10 with uid: 0
fs/cifs/connect.c: Domain name set
fs/cifs/connect.c: Username: bernd.lentes
fs/cifs/connect.c: UNC: \\nas\idg-2 ip: 146.107.8.8
fs/cifs/connect.c: Socket created
fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo 0x7fffffffffffffff
fs/cifs/connect.c: Demultiplex PID: 8983
fs/cifs/connect.c: Existing smb sess not found
fs/cifs/cifssmb.c: secFlags 0x7
fs/cifs/transport.c: For smb_command 114
fs/cifs/transport.c: Sending smb of length 56
fs/cifs/connect.c: rfc1002 length 0x67
fs/cifs/cifssmb.c: Dialect: 0
fs/cifs/cifssmb.c: negprot rc 0
fs/cifs/connect.c: Security Mode: 0x3 Capabilities: 0xc2fc TimeAdjust: 0
fs/cifs/sess.c: sess setup type 1
fs/cifs/transport.c: For smb_command 115
fs/cifs/transport.c: Sending smb: total_len 272
fs/cifs/connect.c: rfc1002 length 0xaa
fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
fs/cifs/sess.c: ssetup rc from sendrecv2 is 0
fs/cifs/sess.c: UID = 1
fs/cifs/sess.c: bleft 125
fs/cifs/sess.c: words left: 0
fs/cifs/sess.c: ssetup freeing small buf ffff8100d1172900
fs/cifs/connect.c: CIFS Session Established successfully
fs/cifs/connect.c: file mode: 0x7f7 dir mode: 0x1ff
fs/cifs/transport.c: For smb_command 117
fs/cifs/transport.c: Sending smb of length 74
fs/cifs/connect.c: rfc1002 length 0x42
fs/cifs/connect.c: Tcon flags: 0x1
fs/cifs/connect.c: CIFS Tcon rc = 0
fs/cifs/cifssmb.c: In QFSDeviceInfo
fs/cifs/transport.c: For smb_command 50
fs/cifs/transport.c: Sending smb of length 68
fs/cifs/connect.c: rfc1002 length 0x44
fs/cifs/cifssmb.c: In QFSAttributeInfo
fs/cifs/transport.c: For smb_command 50
fs/cifs/transport.c: Sending smb of length 68
fs/cifs/connect.c: rfc1002 length 0x50
fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid = 10) rc = 0
fs/cifs/inode.c: CIFS VFS: in cifs_read_inode as Xid: 11 with uid: 0
fs/cifs/inode.c: Getting info on
fs/cifs/transport.c: For smb_command 50
fs/cifs/transport.c: Sending smb of length 74
fs/cifs/connect.c: rfc1002 length 0x8a
fs/cifs/inode.c: Old time 0
fs/cifs/inode.c: New time 4314976311
fs/cifs/inode.c: Directory inode
fs/cifs/inode.c: CIFS VFS: in cifs_revalidate as Xid: 12 with uid: 0
fs/cifs/inode.c: Revalidate: inode 0xffff8100a4933d58 count 1 dentry: 0xffff8100a8cae560 d_time -288797745693789705 jiffies 4314976312
fs/cifs/inode.c: CIFS VFS: leaving cifs_revalidate (xid = 12) rc = 0



If it really worked with SP2, you could compare the /etc/nsswitch.conf , /etc/hosts files from the SP2 and SP4 boxes.

That's the only difference:
pc53200:/etc # diff hosts hosts.pc52785
23c23
< 146.107.93.90 pc53200.helmholtz-muenchen.de pc53200
---
> 127.0.0.2 pc52785.helmholtz-muenchen.de pc52785
Pc52785 is the SP2 box, PC53200 is the SP4 box.
I changed the entry in pc53200 to 127.0.0.2, no improvement.


If it really worked with SP4 1-2 months ago, I'd check if cifs-mounts package changed in the last months (rpm -q --last) and how (rpm -q --changelog cifs-mounts) and if that's relevant. But it may be the kernel, though...
(I had a long battle with Samba last week, where on a day, a valid samba configuration stopped working. Krb5 seemed to be guilty, and although I hate using not core SLES software, installed the krb5 package from opensuse 11.4 which fixed everything. So somethimes we must hack, unfortunately.)

rpm -qa --last |grep cifs:
cifs-mount-3.0.36-0.13.20.1 Mon Apr 16 08:00:46 2012

But i think the problem appeared already before.
I also installed already some packages from Opensuse 10.1 for our SLES boxes, if you don't find an appropriate for SLES ... what else can you do ?
I tried on the SP2 box a mount to a Windows XP share, worked.
Maybe a change on our NetApp Fileserver ? I will aks the storage admin.

rpm -q --changelog -cifs-mount:
* Tue Apr 10 2012 lmuelle@suse.com
- Samba pre-3.6.4 are affected by a vulnerability that allows remote code exe-
cution as the "root" user; PIDL based autogenerated code allows overwriting
beyond of allocated array; CVE-2012-1182; (bso#8815); (bnc#752797).


* Thu Mar 08 2012 sjayaraman@suse.de
- mount.cifs: Properly update mtab during remount; (bnc#747906).

* Mon Feb 20 2012 lmuelle@suse.de
- Ensure AndX offsets are increasing strictly monotonically in pre-3.4
versions; CVE-2012-0870; (bnc#747934).

* Thu Nov 03 2011 shargagan@novell.com
- Fix to handle domain join using NetBIOS name; (bnc #633729).

* Tue Jul 26 2011 lmuelle@suse.de
- The Samba Web Administration Tool (SWAT) versions 3.0.x to 3.5.9 are
affected by a cross-site scripting vulnerability; CVE-2011-2694; (bso#8289);
(bnc#708503).

* Tue Jul 26 2011 lmuelle@suse.de
- The Samba Web Administration Tool (SWAT) versions 3.0.x to 3.5.9 are
affected by a cross-site request forgery; CVE-2011-2522; (bso#8290);
(bnc#705241).



But a packet capture with tcpdump could be more useful. Again, both SP2 and SP4, and see where it goes wrong.

enovaklbank
16-May-2012, 14:01
I got back to this error again:
> fs/cifs/connect.c: invalid transact2 word count
and after googling for it one more time, I found this:
https://bugzilla.redhat.com/show_bug.cgi?id=217532

It's the unix extensions again. Check the NAS config / ask the NAS guy, if he has something like this.