Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NFS pauses to mount at startup
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
danomac
l33t
l33t


Joined: 06 Nov 2004
Posts: 810
Location: Vancouver, BC

PostPosted: Tue Apr 24, 2012 3:34 pm    Post subject: NFS pauses to mount at startup Reply with quote

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?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 29956
Location: 56N 3W

PostPosted: Tue Apr 24, 2012 7:54 pm    Post subject: Reply with quote

danomac,

From memory, you want the bg option in /etc/fstab. Its been a long time, so check
Code:
man mount
under nfs specific options.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
danomac
l33t
l33t


Joined: 06 Nov 2004
Posts: 810
Location: Vancouver, BC

PostPosted: Tue Apr 24, 2012 8:04 pm    Post subject: Reply with quote

Well, dang:

Code:

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.
Back to top
View user's profile Send private message
cach0rr0
Moderator
Moderator


Joined: 13 Nov 2008
Posts: 4117
Location: Houston, Republic of Texas

PostPosted: Wed Apr 25, 2012 5:46 am    Post subject: Reply with quote

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.
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum