Hi:
I have had the below line for the last several years to mount my Buffalo LInkstation. This sudenly refused to mount after an update. Could someone help? Thanks!!
Mount -t cifs returns with error code 22 (Invalid argument).
CIFS version 1 is required for this particular NAS (Buffalo Linkstation 220). That is something I discovered many years ago when I was nto able to mount initially, so it has been mounted with vers=1.0 all these years.
With this I get a message saying “bad usage”. So I omitted the “0 0” at the end, ending with “noatime” which gives me error (22): invalid argument again
Hmmm… There is no smb.conf in /etc/samba. Only the folder “private”. Either my fstab entry was working all along without this file or it needed this file which has somehow been deleted recently.
Ulp…foolish of me. Here goes - in the below line all I believe are valid options. However I get “Bad usage” as the response. Also, I can see that cifs-utils as well as smbclient were updated. The Kernel list shows that 6.2.16-1 is what is running though I don’t know how to figure out when it was updated. I can see it is not labeled “LTS”.
RR-Manjaro% sudo mount -t cifs //192.168.9.8/ramkumarr /mnt/ramkumarrNAS username=ramkumarr,password=xxxxxxxx,vers=1.0,uid=1000,gid=1000,iocharset=utf8,noauto,_netdev,noatime
You would need to pass your options with the -o option to the mount command - otherwise you will get a bad usage response. Not all fstab options make sense when uing a manual mount.
mount -t cifs -o bla1,bla2,bla3 //ip.x.y.z /path/to/mount/point
The most oommon cause as to why users keep using fstab to mount is because the mount command does not allow for user mount.
There is other methods - like this one - which can be executed as user - no root required - supply credentials when challenged.
Another common cause when Samba is acting up on Arch based system is AppArmor - the previously linked topic contains some info on this - although this is most relevant when sharing folders from a Manjaro system.
You need a -o before all the comma separated options.
And 6.1 is the latest LTS Manjaro kernel currently. It’s listed in Applications/Manjaro Settings under kernels through the GUI, and you can install/remove kernels there. (Or mhwd-kernel -i linux61 to install via command line.)
Yes of course I missed the -o though I read it in the manual … I’m definitely getting old. Thanks folks for being so patient with my ignorance + carelessness.
The corrected command below gives me mount error(22): Invalid argument
sudo mount -t cifs //192.168.9.8/ramkumarr /mnt/ramkumarrNAS -o username=ramkumarr,password=xxxxxxxx,vers=1.0,uid=1000,gid=1000,iocharset=utf8,noauto,_netdev,noatime
@linux-aarhus did bring this up in his link he included, and I was replying to most of this on my phone. But I would highly recommend not using fstab for network mounts.
It’s really just creating a file with 10 lines or so, to create a systemd unit. Then just one command to start/mount it (and one to enable on startup). If other services rely on these mounts, it is fairly easy to build in that functionality too.