dr_xemacs
Posts: 7
Joined: Mon Jan 25, 2016 8:46 am

My Raspberry wont recognize my nas

Sat Dec 08, 2018 8:56 am

Hello!

I had some issues with mounting my nas to the system. It seems the kernel grew away so they dont speak with each other anymore. Solved that with adding the option ”vers=1.0” to the line in fstab. Now i can mount the nas manually. My fstab line now looks like this:

//192.168.1.152/media /mnt/nas cifs guest,rw,vers=1.0 0 3

It still doesn’t get mounted from boot. I read from dmesg these lines:

[ 2.481693] systemd-fstab-generator[50]: Checking was requested for "//192.168.1.152/media", but it is not a device.

[ 18.168633] FS-Cache: Netfs 'cifs' registered for caching
[ 18.169999] Key type cifs.spnego registered
[ 18.170041] Key type cifs.idmap registered
[ 18.260465] CIFS VFS: Error connecting to socket. Aborting operation.
[ 18.260498] CIFS VFS: cifs_mount failed w/return code = -101

Can anyone tell me what the deal is?

Another thing that puzzles me is how to do the mount so that anyone can access it rw.

Best, dr_xemacs

User avatar
thagrol
Posts: 934
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: My Raspberry wont recognize my nas

Sat Dec 08, 2018 1:50 pm

I've not seen that particular error but here's a couple of suggestions.

First, run "run sudo raspi-config" amd make sure "Wait for Network on Boot" is enabled.

Then try changing your fstab entry to:

Code: Select all

//192.168.1.152/media /mnt/nas cifs _netdev,auto,user=pi,guest,rw,vers=1.0,file_mode=0777,dir_mode=0777,uid=pi,gid=pi,forceuid,forcegid 0 3
_netdev tells the system its a network device
auto tells the system to auto mount this at boot (should be the default but including it doesn no harm)
user=pi specifies the cifs/samba user. Stops it defaulting to "root" as root may be blocked on the server.
file_mode=0777,dir_mode=0777 set permissions on files and directories, overriding defaults and any sent from the server. 777 gives full read, write, and execute permissions to everyone.
uid=pi,gid=pi sets owner and group for files and directories in the share to "p". Change if you've removed the pi user.
forceuid,forcegid forces the uid and gid even if supplied by the server.

To get rw access, your samba server also has to be configured to allow guests write access. If it hasn't been no amount of frobbing on the pi will enable it.
Note to self: don't feed the trolls
If you believe "L'enfer, c'est les autres" (Hell is other people) have you considered that it may be of your own making?

dr_xemacs
Posts: 7
Joined: Mon Jan 25, 2016 8:46 am

Re: My Raspberry wont recognize my nas

Sat Dec 08, 2018 4:02 pm

Hi and thanks for quick answer...
thagrol wrote: I've not seen that particular error but here's a couple of suggestions.

First, run "run sudo raspi-config" amd make sure "Wait for Network on Boot" is enabled.
That did the trick for boot mount! I didn't even know that was an issue, have however thought many times about optimization and timing in the system startup - as is analogically important in startup of windoze machines... they are a real mess!
thagrol wrote: Then try changing your fstab entry to:

Code: Select all

//192.168.1.152/media /mnt/nas cifs _netdev,auto,user=pi,guest,rw,vers=1.0,file_mode=0777,dir_mode=0777,uid=pi,gid=pi,forceuid,forcegid 0 3
This did the trick for rw possibilities on the nas, and the errors about my nas not being a device.
thagrol wrote:
To get rw access, your samba server also has to be configured to allow guests write access. If it hasn't been no amount of frobbing on the pi will enable it.
...and that was never an issue as I have used this nas with an earlier pi configuration and Linux kernel.

Thank you very much for all help! This solved every question I had with my nas! Exhaustive!

All best! Lasse (aka. dr_xemacs)

Return to “Device Tree”