View previous topic :: View next topic |
Author |
Message |
Evilguru Guru
Joined: 16 Aug 2005 Posts: 390 Location: England
|
Posted: Thu Mar 28, 2013 10:55 am Post subject: Mouting NFS at boot time w/NetworkManager |
|
|
I have been using NetworkManager (which runs at start-up) along with an entry in /etc/fstab:
Code: |
server:/srv/shared /home/freddie/Shared nfs auto,bg
|
in order to have my shares mounted automatically (by nfsmount). However, a couple of days ago, after an update to NetworkManager, this stopped working. In /var/log/messages I see:
Code: |
Mar 25 09:08:44 localhost /etc/init.d/nfsmount[19147]: WARNING: nfsmount is scheduled to start when NetworkManager has started
|
and hence am wondering if I am doing something wrong here?
Regards, Freddie. |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Thu Mar 28, 2013 5:54 pm Post subject: |
|
|
that is supposed to be just an info message, the question would be: Does nfsmount start, without you starting it, in the next minute or two? _________________ Defund the FCC. |
|
Back to top |
|
|
Evilguru Guru
Joined: 16 Aug 2005 Posts: 390 Location: England
|
Posted: Thu Mar 28, 2013 6:21 pm Post subject: |
|
|
DONAHUE wrote: | that is supposed to be just an info message, the question would be: Does nfsmount start, without you starting it, in the next minute or two? |
No. I am forced to run /etc/init.d/nfsmount restart after logging in for the share to be mounted. I have waited in excess of 10 minutes in the past, to no avail. Seems as if it is giving up rather than trying to background mount.
Regards, Freddie. |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Thu Mar 28, 2013 6:27 pm Post subject: |
|
|
rc_parallel="NO" in /etc/rc.conf might help _________________ Defund the FCC. |
|
Back to top |
|
|
Evilguru Guru
Joined: 16 Aug 2005 Posts: 390 Location: England
|
Posted: Sun Mar 31, 2013 3:03 pm Post subject: |
|
|
DONAHUE wrote: | rc_parallel="NO" in /etc/rc.conf might help |
RC parallel is indeed disabled.
Regards, Freddie. |
|
Back to top |
|
|
fredbear5150 Tux's lil' helper
Joined: 11 Oct 2003 Posts: 113
|
Posted: Fri May 03, 2013 12:17 am Post subject: |
|
|
I myself had the same problem and have "rc_parallel=YES" on all my machines. I also use NetworkManager.
The strange thing is that the same two NFS shares I use mount okay on boot on two other machines but not on one of them - maybe it's something to do with the time it takes for the network interface to come up.
Anyway, I fixed it by adding two scripts in /etc/NetworkManager/dispatcher.d:
Code: | 55-rpcbind:
#!/bin/bash
/etc/init.d/rocbind status | grep -q "started"
if test "$2" == "up" -a "$?" != "0" ; then
rc-config start rpcbind
else
rc-config stop rpcbind
fi
|
and:
Code: | 60-nfsmount:
#!/bin/bash
/etc/init.d/nfsmount status | grep -q "started"
if test "$2" == "up" -a "$?" != "0" ; then
rc-config start nfsmount
else
rc-config stop nfsmount
fi
|
You will need to make them executable and then remove nfsmount and rpcbind from rc-update to let the NetworkManager dispatcher start these two services after the network interface has come up. |
|
Back to top |
|
|
orzel n00b
Joined: 22 Jan 2014 Posts: 8 Location: Paris, France
|
Posted: Thu Feb 27, 2014 12:22 am Post subject: |
|
|
fredbear5150 wrote: | You will need to make them executable and then remove nfsmount and rpcbind from rc-update to let the NetworkManager dispatcher start these two services after the network interface has come up. |
I had the problem here, at every boot. I could clearly see from my dhcp server log that nfsmount is started before the network is up.
This tip fixed it, thanks a lot ! |
|
Back to top |
|
|
pgu l33t
Joined: 30 Jul 2009 Posts: 721 Location: Oslo, Norway
|
Posted: Thu Dec 04, 2014 2:39 pm Post subject: |
|
|
I have the same problem. nfsmount does not seem to start at boot, even after rc-update add nfsmount default. However, running /etc/init.d/nfsmount restart after I have booted will mount the filesystems. Seems like there is a missing dependency in nfsmount so that it's started after the required networking resources has loaded.
EDIT: BTW I'm not using the network manager |
|
Back to top |
|
|
|