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:
/home/matt 192.168.1.0/255.255.255.0(rw,sync,no_subtree_check)
/home/shared 192.168.1.0/255.255.255.0(rw,sync,no_subtree_check)
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
:and then run:
Here's my auto.master file for reference :
/etc/auto.master
For my samba share, that's all I need to do to see my shares listed :
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/192.168.1.10
).In your case, you might want to try the /net option, instead of manually specifying your exports. So your auto.master would simply be :
Then after a
sudo service autofs restart
, tryls /net
.