Mount Linux NFS exports in OSX

I’m not a fan of OSX and I try to avoid it with the same verac­ity that I avoid Win­dows. But I recently needed to have a Linux NFS export mounted on an OSX server. A sim­ple mount server:/export /mymountpoint didn’t work and returned “Oper­a­tion not per­mit­ted”. After a bit of dig­ging 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 per­sis­tent of course its not as sim­ple as shov­ing it in /etc/fstab and run­ning “mount –a”. No OSX has to be dif­fi­cult. It turned out lookupd got in the way.  To fix it I did the fol­low­ing after con­fig­ur­ing my fstab.

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

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


  • Forrest Mac OS X Firefox 10.0.2 wrote:

    We’re run­ning into a sim­i­lar issue, but I sus­pect things have changed to OS X Lion. We just want basic, per­sis­tent NFS shares that the auto­mounter doesn’t touch, ever.

    This doesn’t appear to be pos­si­ble. Even if I mount some­thing under a direc­tory struct like /mnt, which is not a part of the OS, the auto­mounter 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 for­got­ten 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 man­page points to dnscacheutil or something.

    I’m begin­ning to see how man­gled, or “cus­tomized”, 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