Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I set out to execute the following steps on OS X Mountain Lion to mount an NFS share-

create

sudo dscl . -create /Mounts/foo
sudo dscl . -create /Mounts/foo VFSLinkDir /Volumes/share
sudo dscl . -create /Mounts/foo VFSOpts resvport ro nosuid
sudo dscl . -create /Mounts/foo VFSType nfs
sudo dscl . -create /Mounts/foo RecordName nfs.example.com:/srv/share

verify

sudo dscl . -list /Mounts
sudo dscl . -read /Mounts/nfs.example.com:/srv/share

After creating, when I tried to list the mounts, my mac air stopped responding. On restart, when I log on to my account, it freezes on a finder window without loading anything else. I can't seem to kill it or start task manager or do anything else.

I can log on to the guest account but not with my own account.

share|improve this question
add comment

1 Answer 1

When you ask to mount an NFS volume this way, "hard"(the default), the computer will try to mount the volume and keep trying (to the exclusion of all else) because it thinks that this volume is critical for system operation. You need to tell the computer that this volume is not needed to run the system. The way you do this is to tell it to mount "soft". While you at it, it helps to include the "intr" option (Allow signals to interrupt an NFS call. Useful for aborting when the server doesn't respond).

So in your command above you need to add soft and intr, like this:

sudo dscl . -create /Mounts/foo VFSOpts resvport intr soft ro nosuid 

You may want to explore these options too, depending on your application they may be useful:

nolocks locallocks wsize=32768 rsize=32768 timeo=900 retrans=3 proto=tcp nfc

Finally, you may be missing a RecordType declaration. I'm not sure if this is created automatically for you, if it is not already there add it by:

sudo dscl . -create /Mounts/foo RecordType dsRecTypeStandard:Mounts

Good luck.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.