You are not logged in.

#1 2024-09-02 22:54:03

lrdoftheblings
Member
Registered: 2024-08-26
Posts: 7

[Solved] Error mounting samba share return code -22

I'm trying to mount the samba share folder on my router with the following command:

sudo mount --mkdir -t cifs //192.168.0.1/G /mnt/sharedrive -o username=admin,password=<redacted>

which gives the following error:

mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

dmesg shows:

[15906.474478] CIFS: Attempting to mount //192.168.0.1/G
[15906.488809] CIFS: VFS: cifs_mount failed w/return code = -22

Last edited by lrdoftheblings (2024-09-03 02:07:23)

Offline

#2 2024-09-02 23:24:43

seth
Member
Registered: 2012-09-03
Posts: 60,393

Re: [Solved] Error mounting samba share return code -22

Did you check the system journal or dmesg?
Try "mount --verbose" to see what's actually passed, but CIFS yells EINVAL all the time.

What kernel is this and what is the share? SMB2 or SMB3 (or SMB1??)

Offline

#3 2024-09-02 23:55:59

lrdoftheblings
Member
Registered: 2024-08-26
Posts: 7

Re: [Solved] Error mounting samba share return code -22

Kernel is 6.6.48-1-lts.

The samba share is v2. It's on a TP-Link Archer AX55 router with USB attached storage.

passing --verbose gives:

mount.cifs kernel mount options: ip=192.168.0.1,unc=\\192.168.0.1\G,user=admin,pass=********
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

Last edited by lrdoftheblings (2024-09-02 23:59:54)

Offline

#4 2024-09-03 00:23:15

loqs
Member
Registered: 2014-03-06
Posts: 18,180

Re: [Solved] Error mounting samba share return code -22

If you explicitly set the version `vers=3.0` or `vers=2.0` or `vers=1.0` is there any change in the output?

Offline

#5 2024-09-03 02:06:34

lrdoftheblings
Member
Registered: 2024-08-26
Posts: 7

Re: [Solved] Error mounting samba share return code -22

Explicitly setting

vers=2.0

worked. Thanks for the help.

Offline

Board footer

Powered by FluxBB