I've followed the ubuntu help docs for setting up NFSv4 on a server running Ubuntu 10.4LTS and now I'm trying to get Autofs (on ubuntu 10.10) to mount the exports, following these instructions. So far it doesn't work.

Where the docs say server -fstype=nfs4 server:/ I'm supposed to replace 'server' with my server's hostname right? If yes, should that be server-foo or server-foo.local?

# Sample /etc/auto.master file
#  --- comments snipped --8<--
+auto.master            # pre-existing
/nfs   /etc/auto.nfs    # added by me


# manually created /etc/auto.nfs
ubuntu-server.local   -fstype=nfs4   ubuntu-server.local:/

ls /nfs/ubuntu-server /nfs/ubuntu-server.local shows nothing. What's the next troubleshooting step?

[update 2011-feb-12] I followed the procedure outlined at Which to use NFS or Samba?. I've now verified that my server export is working because I can mount the nfs shares via /etc/fstab. Here is my config, server side:


And in client /etc/fstab:

ubuntu-server:/home/matt  /nfs/matt  nfs rw,hard,intr 0 0
ubuntu-server:/home/shared  /nfs/shared  nfs rw,hard,intr 0 0

followed by sudo mount /nfs/shared. (I also needed to add an entry to /etc/hosts so the server name would resolve to ip)


If your server name is ubuntu-server, /nfs/tutu where to mount the nfs share, then in /etc/auto.nfs:

tutu -fstype=nfs4 ubuntu-server:/

and then run:

sudo invoke-rc.d autofs restart

ls /nfs/tutu
| improve this answer | |
  • thank you for this suggestion. It did not lead to a solution for me, but I think I may have deeper network issues at play, for instance ping ubuntu-server does not resolve, I have to use ip. – matt wilkie Feb 12 '11 at 18:51
  • this finally works for me, though I followed a long and circuitous route to get here, so the solution may be incomplete. Part of it least involved hard coding the server ip into /etc/hosts – matt wilkie Mar 29 '11 at 5:06

Here's my auto.master file for reference :


/smb /etc/auto.smb uid=1000,gid=1000,--timeout=300 --ghost

For my samba share, that's all I need to do to see my shares listed :

scaine@GroovyTosh:~$ ls /smb/core
Archive  Backups  Data  Live

Due to a bug in smbclient, I have to specify the UID and GID. The timeout is how long before autofs unmounts an unused share and the ghost option keeps previously created folders in place inside /smb even when the share is not available.

I can also browse my /smb by IP address (e.g. ls /smb/

In your case, you might want to try the /net option, instead of manually specifying your exports. So your auto.master would simply be :

/net /etc/auto.net --timeout=300 --ghost

Then after a sudo service autofs restart, try ls /net.

| improve this answer | |
  • Thanks for helping. The /net line does nothing for me, however /smb does get me partway: after adding that and restarting autofsls /smb/ shows the share names I expect, I just can't open any of them. – matt wilkie Jan 3 '11 at 4:22
  • Well that's weird. Your server must be configured for Samba then, as well as the NFS config you're trying to get working. Seeing the shares is a success - you just need to specify the correct /etc/auto.smb. file now to pass credentials to the samba server. – Scaine Jan 3 '11 at 10:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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