nfs no longer starting automatically with wifi

Hi,

I have a small problem :

Running openSuse 11.2-64 on a DualCore / 2Gb machine.
I have 3 nfs shares described in my /etc/fstab
All three were mounted at boot time when I was connecting to the network through the wired interface (eth0).

I need to use the wireless interface, and even if that interface is up and running well (I use ifup), the nfs client doesn’t start… if just after boot I do a mount -a or simply a nfs start, everything comes up and runs well.

This machine will not be used by myself, and the users cannot just jump into a command line and type nfs start or even mount -a (they would need su privileges…)

I have disabled the eth0, killed the eth0 config (with yast) edited /etc/sysconfig/nfs and setted the NFS_START_SERVICE to yes to force the gssd and idmapd to always start even if there was no nfs entry in fstab, but nothing changed.

Does anyone have an idea ?

Thanks

When doing NFS over a wireless line, /etc/init.d/rc5.d/S05nfs is executed long
before the network is running, even when using ifup. Of course, NetworkManager
makes it even worse. I have solved this problem by calling a script from
boot.local that runs in background mode, sleeps for 60 seconds and then does a
“mount -a”. You might also make another link “/etc/init.d/rc5.d/S99nfs” pointing
to “/etc/init.d/nfs”. That might delay the attempt long enough for the network
to be up.

Perhaps you should add your users and the “mount -a” command to /etc/sudoers
just in case the network glitches and they lose the mount.

Oh, thank you, this is a more elegant way of solving the problem ! I was thinking to create a similar script but make it run when the users login (and hoping that they will not login to fast lol!)

And you are right, I’ll add the users to the sudoers with the mount -a command, just in case of.

Question to @lwfinger: I thought that using ifup would start the network connection (at runlevel 3 and 5) before the network services (like nfsd) start, regardless if it is cable or wifi. Are you sure this is not applicable when it is wireless?

And of course, using network manager is by design incompatable with a system that offers network services, again regardless if it is cable or wifi.

On 07/28/2010 04:36 AM, hcvv wrote:
>
> Question to @lwfinger: I thought that using ifup would start the
> network connection (at runlevel 3 and 5) before the network services
> (like nfsd) start, regardless if it is cable or wifi. Are you sure this
> is not applicable when it is wireless?
>
> And of course, using network manager is by design incompatable with a
> system that offers network services, again regardless if it is cable or
> wifi.

Yes, ifup will start wireless at run level 3 or 5; however, the authentication
process can take enough time for the network not to be running when NFS startup
is attempted.

Thanks for the answer. There seems to be some parallel processing where there should have been sequential.

Hi all,

I wrote a bug on this early last year: https://bugzilla.novell.com/show_bug.cgi?id=568303, but it turns out that it is not a bug. Has something to do with mounting /usr over nfs.

The recommended solution is to use autofs for automounting.
Looking at the manpages for autofs will drive you crazy but for the specific scenario of mounting just a few NFS shares it is quite easy to setup so now I no longer need my specific hack.

In my case I had two NFS shares: shikra.lan:/data and shikra.lan:/films to be mounted at /mnt/data and /mnt/films respectively.

To set this up with automount, edit /etc/auto.master and add a line
saying


/mnt   /etc/auto.misc

In other words, the /etc/auto.misc file will define the directories to be automounted under /mnt. Make sure that /mnt exists by creating it if needed.

Next step is to add the mountpoint info to the /etc/auto.misc file:


data            -fstype=nfs,soft,intr   shikra.lan:/data
films           -fstype=nfs,soft,intr   shikra.lan:/data/films

You can find more info about the options soft,intr in the man page for auto.master but soft, intr are relatively friendly).

Next, start autofs and enable automatic start


  /etc/init.d/autofs start
  chkconfig autofs on

and… remove your old hack.

Cheers
Erik

On 2010-07-28 15:26, Larry Finger wrote:
> On 07/28/2010 04:36 AM, hcvv wrote:

> Yes, ifup will start wireless at run level 3 or 5; however, the
> authentication process can take enough time for the network not to be
> running when NFS startup is attempted.

Things might change if you define a network device as mandatory. If there
is need for a delay before starting up NFS, I would put it in the network
script.

Note: instead of boot.local, there is “after.local”.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)