 |
 |
 |
 |
| Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc. |

5th April 2012, 06:44 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: Prague, Czech Republic
Posts: 3

|
|
|
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
|

5th April 2012, 07:23 PM
|
|
Registered User
|
|
Join Date: Dec 2006
Posts: 1,718

|
|
|
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'
|

5th April 2012, 07:59 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: Prague, Czech Republic
Posts: 3

|
|
|
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.
|

5th April 2012, 08:55 PM
|
 |
"Registered User" T-Shirt Winner
|
|
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,119

|
|
|
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.
|

5th April 2012, 08:59 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: Prague, Czech Republic
Posts: 3

|
|
|
Re: NFS at boot time
Quote:
Originally Posted by PabloTwo
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
|

6th April 2012, 12:11 AM
|
 |
"Registered User" T-Shirt Winner
|
|
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,119

|
|
|
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.
|

11th April 2012, 11:31 AM
|
|
Registered User
|
|
Join Date: Jan 2012
Location: auckland
Posts: 39

|
|
|
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.
|

11th April 2012, 11:52 AM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,094

|
|
|
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.
|

11th April 2012, 12:20 PM
|
|
Registered User
|
|
Join Date: Jan 2012
Location: auckland
Posts: 39

|
|
|
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.
|

11th April 2012, 12:39 PM
|
 |
Registered User
|
|
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,299

|
|
|
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.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 18:50 (Sunday, 19-05-2013)
|
|
 |
 |
 |
 |
|
|