6/08/2008

Directory Utility and remote NFS mounts on Mac OS X Leopard

One of the graphical utilities I usually like to use on Mac OS X Leopard, in order to avoid unnecessary command-line tasks, is Directory Utility.

Directory Utility allows you to easily manage local/remote services and file systems. With this tool you can mount remote NFS file systems from *BSD, Linux and other UNIX-based Operating Systems. Although it only takes one command-line call to mount a remote filesystem, that's already very well documented in many Operating System manuals, so that is not the purpose of this post.

If you are wondering how to do it, or having problems doing it, you should launch Directory Utility first. You can access it through the Applications->Utilities folder or you can use Spotlight for that purpose (typing "Directory Utility").
If you want to add a mount, click in the following order after Directory Utility window appears:



The following dialog appears, and you should fill the fields in a similar way to the following:


If you are wondering what -P is, it's basically an indication to use a reserved socket port number. Many people claim this flag prevents connectivity problems associated to Directory Utility and NFS.

If your Mac does not verify your NFS mount and you are positively sure you entered everything correctly, then it's probably because you are connecting to a NFS server that only works with UDP protocol. You can either click Don't verify button while Directory Utility is searching for the NFS server; or, if you are the administrator of the NFS server, you can add support for TCP transports by appending the -t flag when you call nfsd. After you restart the NFS server and retry adding the mount, Directory Utility will probably be able to verify it successfully.

8 comments:

Unknown said...

The article is good, but the Verify button is disabled on my Leopard?!? Any ideas

imkira said...

Hi sakata.
I have noticed that if you do not write a properly formatted URL in the "Remote NFS URL" field, the Verify button won't become enabled.

For instance, if you try to write the URL as : "nfs://192.168.1.1" it won't enable. Instead, if you try "nfs://192.168.1.1/" it will work. Try to make sure you write a properly formatted "NFS URL" and that the local directory for mounting exists and is valid.

Hope this helps.

TheNipponese said...

Thanks for this article, very helpful. One weird problem I am having: when connected to the internet, via a DSL modem, we have no problem connecting to our NFS server, but when we disconnect it, suddenly we aren't able to get the server, even though we haven't changed the network config. Any thoughts?

imkira said...

Hi TheNipponese, thanks for the comments.

What's your network configuration? Is your NFS server on your local area network? Are you writing an IP address directly or a hostname? Does your computer "know" how to reach the NFS server?

Unknown said...

How would you specify a username/password if the NFS share is protected? Thanks!

TheNipponese said...

@imkira~

This is my setup: one g5, one BSD NSF server, 24-port 1gbit switch, then the WAN. But yeah, the NFS serve uses the LAN ip of 192.168.0.11, so in Directory Utility, I am typing: nfs://192.168.0.11/pathto/share

It works great when there is internet access, but no joy without.

imkira said...

Hello blade. As far as I know, you cannot protected a NFS share with a username/password. Don't you mean SMB (samba)?

imkira said...

Hi TheNipponese, have you checked your routing table? I mean, if it's not a DNS problem, then I can only see a reason that your computer doesn't know how to reach the NFS server in the LAN.

To check your routing table issue the command "netstat -r -f inet". Don't hesitate to post the output here if you need more help. Thanks