1

Using Ubuntu 14.04 LTS, I have an NFS server set up to export some directories. The client machine (also Ubuntu 14.04) is using autofs with the following in /etc/auto.master:

/net    -hosts suid

But if I ls /net it shows it's empty.

However, if I do:

showmount -e  10.10.10.103 

it lists the exports.

I notice that -d shows nothing though:

showmount -d 10.10.10.103
Directories on 10.10.10.103:

The Ubuntu documentation mentions troubleshooting using a foreground automount, so I've tried that and get this (even after I've tried cd to /net in another terminal):

gilgongo@alice:~$ sudo automount -f -v
Starting automounter version 5.0.7, master map /etc/auto.master
using kernel protocol version 5.02
mounted indirect on /net with timeout 300, freq 75 seconds

I've also tried using the supplied auto.net script by changing the line in auto.master to:

/net   /etc/auto.net

But that yields the same result.

I've rather not have entries in /etc/fstab and things, and like the idea of the client picking up the exports in /net. But why isn't the -hosts option working?

1 Answer 1

3

S0LVED:

I was expecting autofs to show the NFS server name/IP under the /net mount directory and then show the server's exports under that.

So when I did:

ls /net/

and saw nothing, I concluded it wasn't working.

In fact, what I needed to do was:

ls /net/10.10.10.103/

and then the exports magically tuned up because I was "accessing" them, which is what autofs is designed to do ("Auto-mounts are mounted only as they are accessed, and are unmounted after a period of inactivity.")

So. There we go. Wuah ho.

2
  • 1
    Indeed, it works but it would be better if we could use the DNS name..
    – Paul Praet
    Commented Jan 25, 2017 at 20:05
  • It is possible using DNS name. No reason why it would not work as long as your DNS is working on the client.
    – Speeddymon
    Commented Jan 25, 2018 at 20:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .