# NFS pauses to mount at startup

## danomac

Well... where to start.

My htpc frontend pauses for up to 10 seconds on its startup to mount NFS shares. I never had an issue with this until recently, and I can't figure out why.

The shares it's mounting are data shares, not anything required for actual startup (no /var, /usr or anything of the sort) so there's no need for it to wait. Is there a way to tell it to continue the boot process without waiting for the nfs share to mount?

It just stops at "mounting network filesystems..." Nothing in the logs.

The network is a static IP, so it doesn't wait for dhcp, the interface is brought up pretty much immediately.

Anyone have suggestions?

----------

## NeddySeagoon

danomac,

From memory, you want the bg option in /etc/fstab.  Its been a long time, so check 

```
man mount
```

under nfs specific options.

----------

## danomac

Well, dang:

```

bg / fg

Determines how the mount(8) command behaves if an attempt to mount an export fails. The fg option causes mount(8) to exit with an error status if any part of the mount request times out or fails outright. This is called a "foreground" mount, and is the default behavior if neither the fg nor bg mount option is specified.

If the bg option is specified, a timeout or failure causes the mount(8) command to fork a child which continues to attempt to mount the export. The parent immediately returns with a zero exit code. This is known as a "background" mount.

If the local mount point directory is missing, the mount(8) command acts as if the mount request timed out. This permits nested NFS mounts specified in /etc/fstab to proceed in any order during system initialization, even if some NFS servers are not yet available. Alternatively these issues can be addressed using an automounter (refer to automount(8) for details). 

```

Why didn't I think to look there. Probably because it's worked for years until recently.

I wonder if it'll work like I think though, it sounds like it waits for a failure before forking. Hmm.

----------

## cach0rr0

bg combined with turning off 'netmount' on boot and simply moving your nfs mount commands to the 'local' init script (via editing /etc/conf.d/local) might get you the desired results (?)

tends to be where i dump things that i dont want slowing down my boot process.

----------

