flaqueman
Posts: 2
Joined: Tue Apr 22, 2014 12:35 am

File sharing - OSX Mavericks serves Raspbian

Tue Apr 22, 2014 1:04 am

Hi !
First of all, I would like to apologize if this has been discussed before. I just couldn't find anything on this forum or anywhere else.

I've been trying to setup a file sharing from my MacBookPro running OSX 10.9.2 (mavericks) accessible to a bunch of Raspberry running Raspbian (NOOBS' last version I guess). The idea is to have a folder on my mac shared over network to 6 Pi (they will cron a rsync to get newly taken pictures for an art project).

I tried with a simple SMB file share but the Pi keeps on telling me that either the action is not supported or that too many users are connected to the server (that is none) !

So I tried NFS since it seemed somehow more simple... After 3 days on this, the closest I got to what I want was showmount returning an empty list (I guess this time it's something wrong with the configuration on the mac)...

I'm not a linux master and I'm not asking for the magik answer. I'm just wondering if somebody tried to do the same (raspbian accessing file on mac over NFS or SMB) and if there is an option I'm missing somewhere.

Thanks in advance !

timrowledge
Posts: 1348
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: File sharing - OSX Mavericks serves Raspbian

Wed Apr 23, 2014 12:09 am

I have my Pi using NFS to access a directory on my iMac. It wasn't too hard to get it working (but I have a new problem to do with setting it up that needs discussing somewhere)

My notes to me [derived from the raspbian how-to] about setting it up are -
On Pi-

Code: Select all

`sudo aptitude install nfs-common port map`
On the current version of Raspbian, rpcbind (part of the portmap package) does not start by default. This is presumably done to control memory consumption on our small systems. However, it isn't very big and we need it to make an NFS mount. To enable it manually, so we can mount our directory immediately:

Code: Select all

`sudo service rpcbind start`
To make rpcbind start automatically at boot:

Code: Select all

`sudo update-rc.d rpcbind enable`
Make a directory for the mount.

Code: Select all

mkdir /home/pi/DizietFS
Mount manually to test

Code: Select all

`mount -t nfs 192.168.1.65:/Users/tim /home/pi/DizietFS`
Now, to make it permanent, you need to edit /etc/fstab to make the directory mount at boot. I added a line to the end of /etc/fstab:

Code: Select all

192.168.1.665:/Users/tim /home/pi/DizietFS nfs rsize=8192,wsize=8192,timeo=14,intr 0 0
The rsize and wsize entries are not strictly necessary but I find they give some extra speed.

On iMac, in a terminal

Code: Select all

`sudo nano /etc/exports`
(which won’t normally exist until you save it)
and add the line

Code: Select all

/Users/tim -mapall=tim -alldirs -network 192.168.1.0 -mask 255.255.255.0

Code: Select all

`sudo nfsd restart`
should restart the daemon.
After all that, reboot the Pi and DizietFS ought to be visible and accessible.
-----------

My new problem is that the `sudo update-rc.d rpcbind enable` command is now failing with a complaint

Code: Select all

insserv: warning: script 'mathkernel' missing LSB tags and overrides
and after a reboot the nfs connection is not automatically started - so I have to redo the manual connection.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

flaqueman
Posts: 2
Joined: Tue Apr 22, 2014 12:35 am

Re: File sharing - OSX Mavericks serves Raspbian

Wed Apr 23, 2014 8:59 pm

Wouha !
That was so simple ! Thanks a lot !

I guess I missed enabling the rpcbind service and my exports file didn't look quite like that but I think this is the OSX version of it (most of the tutorials I've been following where meant for Ubuntu/Debian/*nix and not OSX).

The automount works fine for me. I don't think it comes from the mathkernel LSB tag since I've had this warning message even on my newly installed Raspbian.

Thanks again !

Return to “Troubleshooting”