Fedora Linux Support Community & Resources Center
  #1  
Old 5th April 2012, 06:44 AM
tomas Offline
Registered User
 
Join Date: Apr 2012
Location: Prague, Czech Republic
Posts: 3
linuxfirefox
NFS at boot time

Hi all,

I ha an NFS share which I would like to mount at boot time. I have no problem mounting it after I log in, but during the startup it fails with 'mount.nfs: Network is unreachable' message.

My fstab record looks like this:
Code:
<IP address>:/remote/export    /mnt/mountPoint    nfs    nfsvers=3,timeo=14,rw,noexec,hard,intr 0 0
Moreover, network is started before the NFS mount attempts.

Can anyone point me where the problem might be?

Thanks,

Tomas
__________________
Tomáš Šoltys
tomas.soltys@gmail.com
Reply With Quote
  #2  
Old 5th April 2012, 07:23 PM
george_toolan Offline
Registered User
 
Join Date: Dec 2006
Posts: 1,718
linuxfirefox
Re: NFS at boot time

Network has to be up and running before you can mount a network drive. If you use Network Manager it's configured much later. Just have a look at dmesg output:

Code:
[   16.835405] udevd[469]: renamed network interface eth0 to p6p1
[   17.129245] Adding 8388604k swap on /dev/sde1.  Priority:42 extents:1 across:8388604k 

[...]

[   21.306984] NetworkManager[921]: ifcfg-rh:     read connection 'System p6p1'
Reply With Quote
  #3  
Old 5th April 2012, 07:59 PM
tomas Offline
Registered User
 
Join Date: Apr 2012
Location: Prague, Czech Republic
Posts: 3
linuxfirefox
Re: NFS at boot time

If I look at my boot.log then I see that networking has been enabled before attempt to mont shares.

Code:
.
.
.
Starting Restore Sound Card State...
Starting IPv4 firewall with iptables...
Starting IPv6 firewall with ip6tables...
Starting Security Auditing Service...
Starting Machine Check Exception Logging Daemon...
Starting Network Manager...
Starting ABRT Automated Bug Reporting Tool...
.
.
.
Started LSB: Mount and unmount network filesystems.
Started NFSv4 ID-name mapping daemon
Started RPC bind service
Starting NFS file locking service....
Started Open-FCoE Inititator.
Started LSB: Starts and stops login iSCSI daemon.
Starting LSB: Starts and stops login and scanning of iSCSI devices....
Started NFS file locking service.
Starting /mnt/mountPoint... FAILED
See 'systemctl status mnt-mountPoint.mount' for details.
.
.
.
And here is the output from systemctl

Code:
# systemctl status mnt-mountPoint.mount
mnt-mountPoint.mount - /mnt/mountPoint
	  Loaded: loaded
	  Active: failed since Thu, 05 Apr 2012 17:39:29 +0200; 3h 18min ago
	   Where: /mnt/mountPoint
	    What: <IP address>:/remote/export
	 Process: 1083 ExecMount=/bin/mount /mnt/mountPoint (code=exited, status=32)
	  CGroup: name=systemd:/system/mnt-mountPoint.mount
Or am I missing something?

Regards,
Tomas
__________________
Tomáš Šoltys
tomas.soltys@gmail.com

Last edited by tomas; 5th April 2012 at 08:13 PM.
Reply With Quote
  #4  
Old 5th April 2012, 08:55 PM
PabloTwo's Avatar
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,119
linuxchrome
Re: NFS at boot time

There is a big difference between "Starting NetworkManager..." and "Started NetworkManager [OK]" in the boot.log file. From a cold boot, most of the time NeworkManager doesn't finish initializing my Ethernet card until after I'm already at the the Desktop.
Reply With Quote
  #5  
Old 5th April 2012, 08:59 PM
tomas Offline
Registered User
 
Join Date: Apr 2012
Location: Prague, Czech Republic
Posts: 3
linuxfirefox
Re: NFS at boot time

Quote:
Originally Posted by PabloTwo View Post
There is a big difference between "Starting NetworkManager..." and "Started NetworkManager [OK]" in the boot.log file. From a cold boot, most of the time NeworkManager doesn't finish initializing my Ethernet card until after I'm already at the the Desktop.
OK. Seems to be the case.

So is there a way to get the network initialized before nfs mounts?
__________________
Tomáš Šoltys
tomas.soltys@gmail.com
Reply With Quote
  #6  
Old 6th April 2012, 12:11 AM
PabloTwo's Avatar
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,119
linuxchrome
Re: NFS at boot time

There are a few threads on the forum discussing this problem ( trying to do network mounts before the network is completely initialized). The systemd startup scheduling is somewhat haphazard. I think if you use "NetworkManager-wait-online.service" as a search string, you should be able to find some or all of those threads and the suggestions made.
Reply With Quote
  #7  
Old 11th April 2012, 11:31 AM
hieronymous Offline
Registered User
 
Join Date: Jan 2012
Location: auckland
Posts: 39
linuxfirefox
Re: NFS at boot time

Hi tomas

Your fstab nfs load line uses a foreground mount by default, which is likely to fail given the amount of time Network Manager takes to initialize everything.
Try a background (bg) mount - it shoudn't fall over, even if it takes several attempts to make the connection, depending on your timeo and retry settings.
Reply With Quote
  #8  
Old 11th April 2012, 11:52 AM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,094
linuxfirefox
Re: NFS at boot time

I believe a background mount fails immediately when the network is not available. The usual background function occurs when it gets a timeout from a connection, not socket failure.

the easiest thing is to drop NetworkManager and go with network. At least it does things right. I had to give up on NetworkManager if F16, even though it worked on F14 just fine. Hasn't been reasonable since.
Reply With Quote
  #9  
Old 11th April 2012, 12:20 PM
hieronymous Offline
Registered User
 
Join Date: Jan 2012
Location: auckland
Posts: 39
linuxfirefox
Re: NFS at boot time

Re: NFS at boot time

Like jpollard, NetworkManager worked fine for me in F14; my background mounts never failed.

I have continued with NM in F16, still using background mounts, and they work every time, though system messages usually show it takes several requests.
Reply With Quote
  #10  
Old 11th April 2012, 12:39 PM
stevea's Avatar
stevea Online
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,299
linuxfirefox
Re: NFS at boot time

I'm not having any problems on two NFSv4 clients w/ F16 mounting at boot - tho' that wasn't true before some updates.

Q for the OP.

WHICH Fedora are you running ?
Is there any good reason to use NFSv3 ? the odd timeo and the 'hard' option ?
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe

Last edited by stevea; 11th April 2012 at 12:41 PM.
Reply With Quote
Reply

Tags
boot, nfs, time

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FC 13 has long boot time, Boot Messages Posted teknodude Using Fedora 3 26th August 2010 03:34 AM
How to increase the boot selection time in dual boot system mohitgoyal Using Fedora 3 4th March 2010 04:25 PM
Fedora 8 dual boot with Windows XP [Pavilion dv6137tx] Time gets reset every time! maverick280857 Hardware & Laptops 5 23rd March 2008 11:48 AM
First time boot?? codvx87 Using Fedora 3 27th October 2006 10:11 PM
Time always off on boot altht Using Fedora 17 29th July 2005 09:32 PM


Current GMT-time: 18:50 (Sunday, 19-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat