Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 832741 - Always get CIFS error "mount error(22): Invalid argument" with kernel 3.4+
Always get CIFS error "mount error(22): Invalid argument" with kernel 3.4+
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: cifs-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-16 21:04 EDT by Kevin
Modified: 2013-04-14 09:23 EDT (History)
19 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 847769 (view as bug list)
Environment:
Last Closed: 2012-06-22 10:21:39 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kevin 2012-06-16 21:04:25 EDT
Description of problem:
I recently upgraded to Fedora 17 and immediately did the system updates.  I tried to mount shares from a NAS using CIFS and I would always get "mount error(22): Invalid argument".  Note, I used the same mount technique as I did in Fedora 16.

After about an hour of searching, I found some Ubuntu users had the very same issue.  A suggested work around was to test using a kernel below 3.4 to see if it worked again.  I tried this with Fedora 17 and I am able to mount the share.

Here is the url for the Ubuntu problem description:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/995535


Version-Release number of selected component (if applicable):
kernel-PAE-3.4.0-1.fc17.i686
cifs-utils-5.5-1.fc17.i686


How reproducible:


Steps to Reproduce:
1. mount -t cifs -o user=user,pass=pass //<server>/<share> /mnt/<dir>
  
Actual results:
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


Expected results:
The share specified by the above command should be mounted.


Additional info:
Comment 1 Jeff Layton 2012-06-17 06:28:45 EDT
Possibly a problem with the overhauled mount option parser in 3.4.

Does anything pop up in dmesg when you get this error? Could you do the same mount command and add '-v' and post the output here?
Comment 2 Kevin 2012-06-17 09:55:06 EDT
Below is the requested info.  I thought I had seen more output from trying this before, but maybe it was something else.  This is from multiple attempts, not just one, because I expected more output.

Hopefully you don't mind that I replaced the actual ip address with <ip>, along with the <username> and <pass>.

console:
[root@linux ~]# mount --verbose -t cifs -o user=<username>,pass=<pass> //<ip>/media /mnt/backup/media
mount.cifs kernel mount options: ip=<ip>,unc=\\<ip>\media,noexec,nosuid,nodev,,user=<username>,pass=********
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
[root@linux ~]# mount.cifs -v -o user=<username>,pass=<pass> //<ip>/media /mnt/backup/media
mount.cifs kernel mount options: ip=<ip>,unc=\\<ip>\media,user=<username>,pass=********
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
[root@linux ~]# mount.cifs -o user=<username>,pass=<pass> //<ip>/media /mnt/backup/media -v
mount.cifs kernel mount options: ip=<ip>,unc=\\<ip>\media,user=<username>,pass=********
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
[root@linux ~]# mount.cifs -o user=<username>,pass=<pass> //<ip>/media /mnt/backup/media --verbose
mount.cifs kernel mount options: ip=<ip>,unc=\\<ip>\media,user=<username>,pass=********
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

dmesg:
[  237.636927] FS-Cache: Loaded
[  237.656645] FS-Cache: Netfs 'cifs' registered for caching
[  237.676067] CIFS VFS: default security mechanism requested.  The default security mechanism will be upgraded from ntlm to ntlmv2 in kernel release 3.3
[  238.775042] CIFS VFS: Connecting to DFS root not implemented yet
[  238.775166] CIFS VFS: cifs_mount failed w/return code = -22
[  303.960791] CIFS VFS: Connecting to DFS root not implemented yet
[  303.960918] CIFS VFS: cifs_mount failed w/return code = -22
[  322.494906] CIFS VFS: Connecting to DFS root not implemented yet
[  322.495054] CIFS VFS: cifs_mount failed w/return code = -22
[  423.543173] CIFS VFS: Connecting to DFS root not implemented yet
[  423.543299] CIFS VFS: cifs_mount failed w/return code = -22
[  432.864261] CIFS VFS: Connecting to DFS root not implemented yet
[  432.864388] CIFS VFS: cifs_mount failed w/return code = -22

/var/log/messages:
Jun 17 09:43:22 linux kernel: [  303.960791] CIFS VFS: Connecting to DFS root not implemented yet
Jun 17 09:43:22 linux kernel: [  303.960918] CIFS VFS: cifs_mount failed w/return code = -22
Jun 17 09:43:32 linux dbus-daemon[522]: ** Message: No devices in use, exit
Jun 17 09:43:40 linux kernel: [  322.494906] CIFS VFS: Connecting to DFS root not implemented yet
Jun 17 09:43:40 linux kernel: [  322.495054] CIFS VFS: cifs_mount failed w/return code = -22
Jun 17 09:45:21 linux kernel: [  423.543173] CIFS VFS: Connecting to DFS root not implemented yet
Jun 17 09:45:21 linux kernel: [  423.543299] CIFS VFS: cifs_mount failed w/return code = -22
Jun 17 09:45:31 linux kernel: [  432.864261] CIFS VFS: Connecting to DFS root not implemented yet
Jun 17 09:45:31 linux kernel: [  432.864388] CIFS VFS: cifs_mount failed w/return code = -22
Comment 3 Olivier Blin 2012-06-17 18:18:36 EDT
This looks similar to this openSUSE bug:
https://bugzilla.novell.com/show_bug.cgi?id=764402

They got this fix queued upstream:
https://git.samba.org/sfrench/?p=sfrench/cifs-2.6.git;a=commitdiff;h=e73f843a3235a19de38359c91586e9eadef12238
Comment 4 Sachin Prabhu 2012-06-18 05:57:14 EDT
The patch in c#3 is the right one.
Comment 5 Josh Boyer 2012-06-18 08:38:14 EDT
I've committed it to fedora git.
Comment 6 Nerijus Baliūnas 2012-06-22 06:10:15 EDT
Happens on F16 too.
Comment 7 Freddy Willemsen 2012-06-22 08:07:52 EDT
I am hitting this bug as well.

>> I've committed it to fedora git.

Does this mean we can expect a working rpm in the near future?
Comment 8 Josh Boyer 2012-06-22 08:45:45 EDT
(In reply to comment #7)
> I am hitting this bug as well.
> 
> >> I've committed it to fedora git.
> 
> Does this mean we can expect a working rpm in the near future?

The fix should be in the 3.4.3 kernel update that is already in stable for F17.

It will be fixed in F16 in the next build.
Comment 9 Freddy Willemsen 2012-06-22 09:54:29 EDT
Allright, that kernel indeed fixes it.
Comment 10 Fedora Update System 2012-06-26 20:11:49 EDT
kernel-3.4.4-3.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/kernel-3.4.4-3.fc16
Comment 11 Fedora Update System 2012-07-05 19:50:55 EDT
kernel-3.4.4-4.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/kernel-3.4.4-4.fc16
Comment 12 Fedora Update System 2012-07-08 16:52:03 EDT
kernel-3.4.4-4.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 13 Nerijus Baliūnas 2012-07-09 17:29:14 EDT
Unfortunately, 3.4.4-4.fc16 does not help, still the same error
CIFS VFS: Connecting to DFS root not implemented yet
CIFS VFS: cifs_mount failed w/return code = -22
3.3.x works.
Comment 14 Baif 2012-08-11 22:25:58 EDT
3.4.7-1.fc16.x86_64

baif@X61  1036 0 Sun 2012.08.12 10:24:01 CST ~
$ sudo tail /var/log/messages
Aug 12 10:20:04 X61 kernel: [ 2208.449608] CIFS VFS: Connecting to DFS root not implemented yet
Aug 12 10:20:04 X61 kernel: [ 2208.449730] CIFS VFS: cifs_mount failed w/return code = -22
Aug 12 10:21:22 X61 kernel: [ 2287.159559] CIFS VFS: Connecting to DFS root not implemented yet
Aug 12 10:21:22 X61 kernel: [ 2287.159682] CIFS VFS: cifs_mount failed w/return code = -22
Aug 12 10:22:39 X61 kernel: [ 2363.658587] CIFS VFS: Connecting to DFS root not implemented yet
Aug 12 10:22:39 X61 kernel: [ 2363.658649] CIFS VFS: cifs_mount failed w/return code = -22
Aug 12 10:23:57 X61 kernel: [ 2441.347807] CIFS VFS: Connecting to DFS root not implemented yet
Aug 12 10:23:57 X61 kernel: [ 2441.347869] CIFS VFS: cifs_mount failed w/return code = -22
Aug 12 10:24:01 X61 kernel: [ 2445.677687] CIFS VFS: Connecting to DFS root not implemented yet
Aug 12 10:24:01 X61 kernel: [ 2445.677751] CIFS VFS: cifs_mount failed w/return code = -22

baif@X61  1037 0 Sun 2012.08.12 10:24:08 CST ~
$ uname -a

Linux X61 3.4.7-1.fc16.x86_64 #1 SMP Mon Jul 30 16:37:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

baif@X61  1038 0 Sun 2012.08.12 10:24:54 CST ~
$ cat /etc/redhat-release 
Fedora release 16 (Verne)
Comment 15 Albert Strasheim 2012-08-13 07:41:16 EDT
Yep, 3.4.7-1.fc16.x86_64 seems broken for me too.
Comment 16 Jeff Layton 2012-08-13 09:35:01 EDT
I recommend cloning this bug for f16 if the bug is there too...
Comment 17 Mariusz Pluciński 2013-01-03 17:55:41 EST
I still get this error, trying to mount directory shared from OSX 10.8 under Fedora 17 using SMB:

[root@mplucinski mnt]# mount.cifs //<IP>/<SHARE> -o username=<USER> -v
Password for <USER>@//<IP>/<SHARE>:  *************
mount.cifs kernel mount options: ip=<IP>,unc=\\<IP>\<SHARE>,user=<USER>,pass=********
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

(I have replaced my private data with <...> "tags")

dmesg:
[10064.488234] CIFS VFS: cifs_mount failed w/return code = -22

/var/log/messages:
Jan  3 23:19:28 mplucinski kernel: [10064.488234] CIFS VFS: cifs_mount failed w/return code = -22

I am able to login and view shared resources using smbclient on the same machine.

Environment:

System: Fedora 17
kernel: 3.6.10-2.fc17 x86_64
cifs-utils: 5.8-1.fc17
Comment 18 Graham Chapman 2013-04-07 13:03:02 EDT
Hi, 

I find this happenning to me, immediately after installing a routine software update for Fedora 17.

[root@GrahamDell1 ~]# mount -a
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
[root@GrahamDell1 ~]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Mon Oct  8 12:04:20 2012
#
.
.
.
//192.168.0.2/l$ /mnt-user/cifs-tosh-l cifs rw,username=<user>,password=<password> 0 0
//192.168.0.2/m$ /mnt-user/cifs-tosh-m cifs rw,username=<user>,password=<password> 0 0
.
.
.
[root@GrahamDell1 ~]# mount -a
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
[root@GrahamDell1 ~]# uname -a
Linux GrahamDell1 3.8.4-102.fc17.i686.PAE #1 SMP Sun Mar 24 13:15:17 UTC 2013 i686 i686 i386 GNU/Linux
[root@GrahamDell1 ~]# dmesg
.
.
.
[148651.491301] CIFS VFS: cifs_mount failed w/return code = -22
[148651.504679] CIFS VFS: cifs_mount failed w/return code = -22
[148743.046381] CIFS VFS: cifs_mount failed w/return code = -22
[148743.074142] CIFS VFS: cifs_mount failed w/return code = -22
[root@GrahamDell1 ~]#

Has the fix been regressed ? 

Graham Chapman
Comment 19 Alexander Murashkin 2013-04-12 19:42:51 EDT
I had had the same problem with kernel

kernel-3.8.3-203.fc18.x86_64

The problem disappeared after I upgraded to 

kernel-3.8.5-201.fc18.x86_64
cifs-utils-6.0-1.fc18.x86_64
Comment 20 Jeff Layton 2013-04-12 21:02:53 EDT
Were you mounting a win8 server? If so, then the problem you were hitting is probably due to the switch to sec=ntlmssp by default, and bug 919084.
Comment 21 Graham Chapman 2013-04-13 12:44:18 EDT
Thanks Alexander, I would prefer to remain on F17 a little while longer but if I have to go to 18 - OK.
Jeff - no, Win7, but thanks for the idea, I'm sure it will help someone else.

Graham Chapman
Comment 22 Jeff Layton 2013-04-13 20:10:30 EDT
Ahh, win7 may have similar problems. I think it supports NegoEx too...
Comment 23 Graham Chapman 2013-04-14 09:23:57 EDT
Buy that man a beer! Yes Jeff, adding 'sec=ntlm' to my option list solves the problem, with W7. My man page documents :

"The default in mainline kernel versions prior to v3.8 was sec=ntlm. In v3.8, the default was changed to sec=ntlmssp."

but there may be more to it than that, as if it's that simple, I can't see why Alexander's problem disappeared.

- Graham

Note You need to log in before you can comment on or make changes to this bug.