Trouble making NFS work with Mac OS X

Michael Hopkins, Hopkins Research michael.hopkins at hopkins-research.com
Wed Dec 15 09:14:36 PST 2004


Hi all

I keep reading that Mac OS X is very easy to get working other machines
using open standards.  This is not my current experience after two fruitless
days messing about with NFS, but I am no network expert so maybe I am
missing something really obvious - or maybe it's the FreeBSD box that is
giving the problem?

Anyway, I have tried to follow all the rules; see below.

NFS server on a FreeBSD 5.3 box         IP: 192.168.0.2
NFS client on a Mac OS X (10.3.6) box.  IP: 192.168.0.5

I want to export the /home directory on the server to the client using NFS.
My username (mwh) has the same uid (501) & gid (20) on both boxes.

************************************************
Server setup:
-------------

/etc/exports
-------------
/home -maproot=root      192.168.0.5 {have tried different -options, not
                                      sure which is best for this situation}
/etc/rc.conf contains
----------------------
nfs_client_enable="YES"
nfs_reserved_port_only="NO"
nfs_server_enable="YES"
rpcbind_enable="YES"
rpc_statd_enable="YES"
amd_enable="YES"

Have restarted mountd and rebooted machine to make sure all services are
operating and latest /etc/exports is being used.

******************************************************
Client setup:
-------------

Firewall off.  Can ping and ssh to server from client so connection is fine.

My directions came from these two Googled pages:

 http://sial.org/howto/osx/automount/
 http://www.cs.dixie.edu/ldap/mac/nfs/

First tried 'Connect to Server' from Finder Apple-K with:

 nfs:/192.168.0.2/home
 nfs:/192.168.0.2
 192.168.0.2/home
 192.168.0.2

...nothing.

Then used NetInfo Manager to try and stay tidy and within Mac OS X idiom.
Made new entity in 'mounts':
-----------------------------
vfstype  nfs
dir      /home                    {& /mnt, /Network/Servers }
name     192.168.0.2:/home
opts     -b net -P -s -T          {and others}

No joy - server appears in Finder but accessing it shows no files.

So tried automounting manually via a file as in sial.org page.

$ sudo automount -m /nfs ~/auto.nfs

...where auto.nfs contains this line:
Athlon-mwh -rw,bg,intr 192.168.0.2:/home

This makes server icon appear in the right place in the Finder but when you
try to access it you get nowhere and this appears in the system log:

Dec 15 14:22:15 localhost automount[424]: automount version 57
Dec 15 14:22:59 localhost automount[424]: mount (NFSV3)
192.168.0.2:111:/home/mwh - Permission denied
Dec 15 14:23:07 localhost automount[424]: mount (NFSV3)
192.168.0.2:111:/home/mwh - Permission denied
Dec 15 14:23:07 localhost kernel: nfs server automount /Users/mwh/auto.nfs
[424]: not responding
Dec 15 14:23:19 localhost automount[424]: mount (NFSV2)
192.168.0.2:111:/home/mwh - Permission denied
Dec 15 14:23:35 localhost kernel: nfs server automount /Users/mwh/auto.nfs
[424]: is alive again
Dec 15 14:23:35 localhost automount[424]: mount (NFSV2)
192.168.0.2:111:/home/mwh - Permission denied
Dec 15 14:23:35 localhost automount[424]: Mount /nfs/Athlon-mwh status 1

$ ls /nfs/Athlon-home
gives permission denied

Commands from shell on client:

% rpcinfo -p 192.168.0.2
   program vers proto   port
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100000    4     7    111  portmapper
    100000    3     7    111  portmapper
    100000    2     7    111  portmapper
    100005    1   udp    653  mountd
    100005    3   udp    653  mountd
    100005    1   tcp    856  mountd
    100005    3   tcp    856  mountd
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100024    1   udp    860  status
    100024    1   tcp    754  status
    100021    0   udp    617  nlockmgr
    100021    1   udp    617  nlockmgr
    100021    3   udp    617  nlockmgr
    100021    4   udp    617  nlockmgr
    100021    0   tcp    698  nlockmgr
    100021    1   tcp    698  nlockmgr
    100021    3   tcp    698  nlockmgr
    100021    4   tcp    698  nlockmgr
    300019    1   tcp    963  amd
    300019    1   udp    609  amd


Tried NFS manager from here:

 http://www.bresink.de/osx/NFSManager.html

...but seems a little buggy or at least very slow.  Doesnt make NFS work any
better.

Portscan of server from client gives:

     Open Port:     22         ssh
     Open Port:     111        sunrpc
     Open Port:     698        olsr
     Open Port:     754        tell
     Open Port:     856
     Open Port:     963
     Open Port:     2049       shilp


I'm now out of ideas and still not even sure if it's the client or the
server that isn't setup properly.  Maybe it's both!  ;o)

Any suggestions on what I should try or diagnostics that I can run would be
greatly appreciated.

Would I be better to set up netatalk and/or afpd?  I have read comments that
they work faster than NFS between OS X and FreeBSD - though quite honestly
ease of setup and reliability is more important to me right now. If it's a
good option then any hints on setup would be appreciated there too.

TIA

Michael

P.S.  Please cc to my email address.


_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

        _/    _/   _/_/_/             Hopkins Research Ltd
       _/    _/   _/    _/
      _/_/_/_/   _/_/_/          http://www.hopkins-research.com/
     _/    _/   _/   _/
    _/    _/   _/     _/               'touch the future'
                   
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/






More information about the freebsd-net mailing list