# AUTOFS startup delay

## RayDude

I have a problem with autofs (tried both version 3 and version 4 in 2.6.12-rc-mm blah blah blah).

After bootup, the nfs drives which are automounted do not become available until after a minute or so of being booted.

This results in me not being able to log in until after waiting for the drives to become available because one of the drives is /home.

I thought it may be related to yellow pages (NISPLUS) but I have the same problem at home on 2.6.12-rc?-love and nisplus is not running at home. Its a simple NFS share.

Why is there a delay in making the drive available.

I noticed that the autofs mounted USB drive is immediately available. I wonder if its networking related.

Raydude

----------

## Spooky Ghost

Can you identify if the delay is in nfs or in autofs?  If you mount the nfs directory by hand at another mount point is it immediately available?

----------

## RayDude

 *Spooky Ghost wrote:*   

> Can you identify if the delay is in nfs or in autofs?  If you mount the nfs directory by hand at another mount point is it immediately available?

 

That's a great question. I can't test it here at work because I need autofs (at least I think I do, this is an nisplus yp mount). I'll test it at home when I get there later to see if it'll mount without autofs.

Raydude

----------

## RayDude

 *Spooky Ghost wrote:*   

> Can you identify if the delay is in nfs or in autofs?  If you mount the nfs directory by hand at another mount point is it immediately available?

 

I'm having problems with my atheros drivers at home. They wouldn't load all the time, just once in a while. So I've had problems testing netmount. I also changed from WEP to WPA and its been giving me worlds of trouble.

I remembered, however, that when I had the nfs mount in fstab way back when I was first bringing it up that it would never mount during boot because the net wasn't available (even though it should have been). That's why I tried autofs, figuring maybe that would help somehow.

Since fighting with initng, and madwifi 0.4.0 I've gone back to sysvinit and in order to get mad wifi to be 100% stable I've had to add much of the network stuff to local.start:

```
/etc/init.d/net.ath0 start

/etc/init.d/autofs start

/etc/init.d/ntpd start
```

This has had the effect of making everything work every time (well of the last four boots).

And the nfs mount is available as well, right away.

Although wpa_supplicant takes a while to register and let dhcpcd run, once it runs, autofs works perfectly.

It must be some dependency that's not right...

Is a dependency of "net" the same as "net.ath0?"

Raydude

----------

## RayDude

I finally found the error message. I guess I was looking for the wrong thing:

/var/log/messages:

```
May 23 13:55:17 computer_gentoo automount[15281]: mount(nfs): connect failed for nfs_server: No buffer space available
```

How do I insure that buffer space is available?

And if there's not enough, why does it become available later?

Is it talking about swap space?

```
/dev/hda3            4461        4585     1004062+  82  Linux swap / Solaris
```

I found a googled site on sun.com that mentions that the swap may not be big enough. I have a gig of swap and a gig of RAM. How could I possibly be out of space?

Or is it talking about space on the server itself?

Raydude

----------

## RayDude

I think I may have found a fix.

/etc/conf.d/rc:

```
# RC_NET_STRICT_CHECKING allows some flexibility with the 'net' service.

# The following values are allowed:

#  none  - The 'net' service is always considered up.

#  no    - This basically means that at least one net.* service besides net.lo

#          mus]t be up.  This can be used by notebook users that have a wifi and

#          a static nic, and only wants one up at any given time to have the

#          'net' service seen as up.

#  lo    - This is the same as the 'no' option, but net.lo is also counted.

#          This should be useful to people that do not care about any specific

#          interface being up at boot.

#  yes   - For this ALL network interfaces MUST be up for the 'net' service to

#          be considered up.

RC_NET_STRICT_CHECKING="yes"
```

I'll try this at work on Tuesday.

Raydude

----------

## RayDude

Nope. Didn't work...

Still have to wait a minute or so to log in...

Dang this is annoying...

Raydude

----------

## RayDude

I changed the order in which the two automount NFS drives mount (swapped them in /etc/autofs/auto.master) and the problem transfered to the other item.

Which means /home is mounted right away, making it so I can log in immediately.

Raydude

----------

## zen_guerrilla

I suppose you have portmap & nfsmount in you runlevel, right ?

----------

## RayDude

 *zen_guerrilla wrote:*   

> I suppose you have portmap & nfsmount in you runlevel, right ?

 

I have portmap and autofs in my default runlevel, yes.

Raydude

----------

## zen_guerrilla

Make sure you have a dns server running on your lan & use it on your server/client or at least put correct entries in /etc/hosts for both machines on both machines.

Failure on reverse DNS lookups is a major cause for delay on nfs.

----------

## RayDude

 *zen_guerrilla wrote:*   

> Make sure you have a dns server running on your lan & use it on your server/client or at least put correct entries in /etc/hosts for both machines on both machines.
> 
> Failure on reverse DNS lookups is a major cause for delay on nfs.

 

I'll try putting the NFS server ip in my hosts file on Monday. There isn't actually a reverse dns on my machine, because they won't put it in DNS because they didn't install it and won't support it. If that's my problem I'm SOL.

Thanks,

Raydude

----------

## zen_guerrilla

 *RayDude wrote:*   

> I'll try putting the NFS server ip in my hosts file on Monday. There isn't actually a reverse dns on my machine, because they won't put it in DNS because they didn't install it and won't support it. If that's my problem I'm SOL.

 

"Normal" DNS binds a hostname to an ip, reverse does the exact opposite, bind an ip address to a hostname. So you can just put lines like the following on both server/clients' /etc/hosts:

```
10.0.0.1     server.mydomain.org    server

10.0.0.2     client1.mydomain.org   client
```

----------

