# autofs fails to mount

## therealjrd

I'm stumped.

Just finished configuring a new gentoo box.  Most stuff works, but autofs is doing something I've never seen.  As near as I can tell it's configured like other client boxes on my net, but it can't seem to mount the export from the server.

I can ls /net/<server>/<export>.  In my case, that's /net/kong/mnt/md0.  lt shows the names of dirs at that exported dir.  But if I try to ls one of the directories inside, it says no such file or directory.

If I shut off autofs and mount the thing by hand, it works perfectly, I can see all the dirs inside the mount point, etc, etc.

In my syslog, when I make the attempt to access stuff inside the mounted dir, I see

Jun  7 15:17:32 kong2 rpc.statd[25802]: Version 1.2.3 starting

Jun  7 15:17:32 kong2 rpc.statd[25802]: Flags: TI-RPC 

[yes, kong2 is the client, kong is the server[

No other messages which appear to be relevant.

showmount, when run by hand, generates sensible output.

Not sure what to pursue here.  Suggestions?

BTW basic config is an x86 box running hardened/linux/x86 profile.  emerged up to date as of last week.  kernel 2.6.37-hardened-r7, autofs-5.0.4-r5.

Thanks in advance...

----------

## therealjrd

Anybody got any ideas on this one?

----------

## disi

I just experience the same problem (yesterday everything worked perfectly)

There was an upgrade on autofs, I think...

debug output:

```
Jun 27 18:09:57 localhost automount[7779]: Starting automounter version 5.0.5, master map auto.master

Jun 27 18:09:57 localhost automount[7779]: using kernel protocol version 5.02

Jun 27 18:09:57 localhost automount[7779]: lookup_nss_read_master: reading master files auto.master

Jun 27 18:09:57 localhost automount[7779]: parse_init: parse(sun): init gathered global options: (null)

Jun 27 18:09:57 localhost automount[7779]: no mounts in table
```

No other logs, it doesn't even try to mount (I would see it on the server)...

net-fs/autofs-5.0.4-r5 is no better...

nfs is loaded and autofs4 build into the kernel (which was able to mount it yesterday)

----------

## disi

lol, all the stuff was moved into the folder /etc/autofs/ ^^

copy your auto.master and auto.misc there and it should be working...

----------

## disi

still, one directory shows up as:

```
disi-bigtop ~ # ls -l /mnt/auto/

ls: cannot access /mnt/auto/media: No such file or directory

total 15

drwxr-xr-x  6 disi disi  8 Jun 26 18:15 data

drwxr-xr-x 13 disi disi 16 Jun 26 17:55 documents

drwxrwxrwx  6 disi disi  6 Jun 26 19:02 downloads

d?????????  ? ?    ?     ?            ? media

```

hmm.... manual mount is fine...

```

un 27 18:42:42 localhost automount[3469]: st_ready: st_ready(): state = 2 path /mnt/auto

Jun 27 18:42:42 localhost automount[3469]: handle_packet: type = 3

Jun 27 18:42:42 localhost automount[3469]: handle_packet_missing_indirect: token 81, name media, request pid 3511

Jun 27 18:42:42 localhost automount[3469]: attempting to mount entry /mnt/auto/media

Jun 27 18:42:42 localhost automount[3469]: lookup_mount: lookup(file): looking up media

Jun 27 18:42:42 localhost automount[3469]: dev_ioctl_send_fail: token = 81

Jun 27 18:42:42 localhost automount[3469]: failed to mount /mnt/auto/media

Jun 27 18:42:42 localhost automount[3469]: handle_packet: type = 3

Jun 27 18:42:42 localhost automount[3469]: handle_packet_missing_indirect: token 82, name downloads, request pid 3511
```

seems to be a parsing error?

```
Jun 27 18:43:15 localhost automount[3469]: handle_packet_missing_indirect: token 89, name [net-fs, request pid 3562

Jun 27 18:43:15 localhost automount[3469]: attempting to mount entry /mnt/auto/[net-fs

Jun 27 18:43:15 localhost automount[3469]: lookup_mount: lookup(file): looking up [net-fs

Jun 27 18:43:15 localhost automount[3469]: dev_ioctl_send_fail: token = 89

Jun 27 18:43:15 localhost automount[3469]: failed to mount /mnt/auto/[net-fs

Jun 27 18:43:15 localhost automount[3469]: handle_packet: type = 3

Jun 27 18:43:15 localhost automount[3469]: handle_packet_missing_indirect: token 90, name net-fs_-_autofs-5.0.5-r4, request pid 3562

Jun 27 18:43:15 localhost automount[3469]: attempting to mount entry /mnt/auto/net-fs_-_autofs-5.0.5-r4

Jun 27 18:43:15 localhost automount[3469]: lookup_mount: lookup(file): looking up net-fs_-_autofs-5.0.5-r4

Jun 27 18:43:15 localhost automount[3469]: key "net-fs_-_autofs-5.0.5-r4" not found in map source(s).

```

/mnt/auto/[net-fs << that certainly doesn't exist...

----------

## disi

argh -.-

 *Quote:*   

> media           -rw,vers=4,soft,async   192.168.0.254:/tank1/media
> 
> downloads       -rw,vers=3,soft,async   192.168.0.254:/tank1/downloads

 

so copy the auto.misc and auto.master to /etc/autofs/ solves the problem...

----------

## rafo

I am confused here, the auto.master manpage (of autofs version 5.0.4-r5) says that the default location of the auto.master file is not /etc/autofs/ but rather /etc/. This seems indeed to be the case on a machine that I installed recently.

----------

## disi

 *rafo wrote:*   

> I am confused here, the auto.master manpage (of autofs version 5.0.4-r5) says that the default location of the auto.master file is not /etc/autofs/ but rather /etc/. This seems indeed to be the case on a machine that I installed recently.

 

Do you also have no auto.misc in /etc/autofs/ ?

As I stated, I copied the config files. So they are resident in /etc/ and /etc/autofs at the moment.

The auto.master is rather empty in my place and just refers to the auto.misc file (or whatever you call it).

I double check later at home...

----------

## rafo

If I recall things correctly I emerged the autofs package, then checked for the existence of /etc/autofs/, found it to be "missing", and created it manually.

However, perhaps /etc/autofs has no special meaning anymore. Examining the manually created directory with

```
equery belongs /etc/autofs/
```

yields nothing.

----------

## paddlaren

Hi!

I had similar peculiarities with my upgrade and service cleaning. 

First I moved all auto.* into /etc/autofs

I also discovered that you have to start /etc/inbit/nfs for the /etc/init.d/autofs to work. NFS in turn starts some other services (those might be the one actually needed). 

This was all I needed to be able to make autofs work again. 

BR

Erik

----------

