Mount Linux NFS exports in OSX

I’m not a fan of OSX and I try to avoid it with the same veracity that I avoid Windows. But I recently needed to have a Linux NFS export mounted on an OSX server. A simple mount server:/export /mymountpoint didn’t work and returned “Operation not permitted”. After a bit of digging I found the solution.

I needed to instruct the client to use a privledged port by adding the “-P” option.

mount -o -P nfssrv:/export /mymount

Now to make it persistent of course its not as simple as shoving it in /etc/fstab and running “mount -a”. No OSX has to be difficult. It turned out lookupd got in the way.  To fix it I did the following after configuring my fstab.

mkdir /etc/lookupd
echo "LookupOrder Cache NI FF" >> /etc/lookupd/mounts
kill -HUP `cat /var/run/lookupd.pid`
mount -a

Yay that should have mounted your NFS mount and have it be persistent.

3 Comments

  • Forrest Mac OS X Firefox 10.0.2 wrote:

    We’re running into a similar issue, but I suspect things have changed to OS X Lion. We just want basic, persistent NFS shares that the automounter doesn’t touch, ever.

    This doesn’t appear to be possible. Even if I mount something under a directory struct like /mnt, which is not a part of the OS, the automounter seems to grab that too.

    When I umount an NFS mount, I want it to stay that way until I remount it.

    This is the most bizarre OS in that regard that I’ve ever seen :-)

  • heh I had forgotten about that issue, I don’t think I have touched osx since I posted it :)

  • Forrest Mac OS X Firefox 10.0.2 wrote:

    I don’t think lookupd even applies in Lion. At least, the manpage points to dnscacheutil or something.

    I’m beginning to see how mangled, or “customized”, OS X is becoming.

Leave a Reply

Your email is never shared.Required fields are marked *

To submit your comment, click the image below where it asks you to...
Clickcha - The One-Click Captcha