Boot OpenSuse and Time Out for NFS

I’m trying to make a notebook work with NFS, and I’m having several problems
I would like to address one problem at a time and here’s the first problem.
I have in my fstab, four lines trying to mount four different machines

 
casa:/home/sergio       /mnt/casa       nfs4    rw,user,users 0 0 
net:/home/sergio        /mnt/net        nfs4    rw,user,users 0 0 
faturam:/home/faturam     /mnt/faturam  nfs4    ro,user,users 0 0 
vendas:/home/sergio        /mnt/vendas  nfs4    rw,user,users 0 0 

When I turn on this Notebook, there has been a huge delay
I noticed that the system load is stopped on the line below

The start job is runing for LSB: NSF client services (xxmin xxs / xmin xs)

Where xx is a number that refers to the elapsed time and time to be achieved. After the time is reached, new count begins for each line of fstab and the total delay reaches almost 10 minutes if all the servers are turned off.
Of course this seems to be referring to the time out that controls access to server machines

I wanted to know how do I set this timeout to a lower value.

Does anyone have any ideas?

You mean you have these timeouts when server(s) are not available?

I have a system with an NFS mount where it is not garanteed that the server is available at boot. Consequently I added the noauto option to avoid the timeout:

boven.henm.xs4all.nl:/home/wij		/home/wij nfs	noauto	0 0 

Of course then the mounting never will take place. Thus I have a crontab entry for root on the client:

beneden:~ # crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.u9mgrc installed on Tue Jul 15 12:31:29 2014)
# (Cronie version 4.2)
-*/1 * * * *    /root/bin/nfsmount
beneden:~ #

It will run a script every minute. And the script is:

beneden:~ # cat bin/nfsmount
#!/bin/bash
if  -a /home/wij/Not-mounted ]]
then    ping -c 1 -q boven >/dev/null && mount /home/wij >/dev/null 2>&1
fi
beneden:~ # 

The first test here is to decide if the mount is already active ot not. You can test that in several ways. I created an empty file with the name Not-mounted in the mount point (of course when the mount was not active). That file will be invisible when the mount is active. Other ways to check this are availble (e.g. checking output of the mount command).

This is not exactly what you asked for, but this is how I solved it.

Wow … crontab is very good. I did not know the crontab. Thank you for the tip. I’ll use the crontab in many things

Their way of resolving the issue is very interesting, I’ll try later.
However, I have more doubts. I am now on a client PC that accesses both servers and they are off. I’m not using the noauto fstab and I do the boot there was no delay.

I do not understand what the cause that makes my Notbook have problems with timeOut and this PC makes the boot as fast as their servers are turned off

What is it doing this difference?

My problem more commonly on the laptop is caused by there being no wireless connection to the server until a user logs on. autofs which can try to mount nfs shares when they are needed rather than on boot works for me.

My wireless card is not working well on my Asus NoteBook. Sometimes works with slowness, I will try to solve this problem.

But do not believe it to be the cause of the slowness I’m having when I start the machine after disconnection NFSS servers, because the problem also occurs when access to cable network.

I still do not understand what the cause that makes a machine having problems with NFS servers off and other machines not have this problem (using the same configuration)

Please, any idea?

I’m stuck. The only way I’ve encountered it happening is there is no communication between the client and the server - for me most often the client has no internet connection but it could also be the server is down).

The only resolution I found was not to have nfs trying to connect at boot. Both methods given in this thread effectively do that (but take a different approach to mounting the shares). It could well be that there is another way to avoid the boot problem but I don’t know it.

A question. On a machine that doesn’t have this problem, are there fstab entries for the nfs drives?

Yes. the fstab entries for the nfs drivers are the same in all machines.
The machines that do not have problems try the connection, but if the server is off, they simply ignore and the boot goes on.

This is a very strange behaviour. Can you, please, post the nfs entries for the both machines?

This is fstab my noteBook with problem


casa:/home/sergio       /mnt/casa       nfs4    rw,user,users 0 0 
net:/home/sergio        /mnt/net        nfs4    rw,user,users 0 0 
faturam:/home/faturam     /mnt/faturam  nfs4    ro,user,users 0 0 
vendas:/home/sergio        /mnt/vendas  nfs4    rw,user,users 0 0 

This is fstab from machine no problem


casa:/home/sergio       /mnt/casa       nfs4    rw,user,users 0 0 
asus:/home/sergio       /mnt/asus       nfs4    rw,user,users 0 0 
192.168.1.31:/home/sergio/icones        /mnt/Nova\040Pasta/icones       nfs     defaults 0 0 
~                                                                                                            

No more idea?
I am condemned to never use “auto” in my fstab?

Well, I just did a fresh install on a new PC, using the OpenSuse 42.1 Leap
To my surprise, it is going the same problem.
When I start the machine there is a huge delay in starting the system, because of NFS servers off.
So, I’m thinking that you do not use NFS, otherwise you guys would also be already complaining of this problem.
Perhaps there is a way to reduce this time out. Does anyone know anything about it?
How can I fix this?

This is, in part, repeating what others have said.

I do not use NFS for the install. So a freshly installed system does not depend on NFS.

After the install, I setup “autofs” (sometimes called the “automounter”). This mounts NFS shares as needed.

Example: I have “autofs” setup on my laptop. And I regularly use the NFS share (mounted at “/nfsmounts/shared”). That NFS share is accessible only from within the home network. Thus, when traveling with that laptop, the NFS server will not be available. It still boots up, and I don’t run into problems as long as I avoid doing anything that accesses the NFS share.

Before, with previous versions did not have this problem.
Sorry, but I do not understand.
What is “autofs” and “automounter”?
I understand that if I use “noauto” in my “/etc/fstab”, I will not have problems if the server is not connected. But where and how I use “autofs” and “automounter”?

It is explained reasonably well with:

man automount

I don’t use NFS much, but when I do, I prefer the automount approach (autofs) as well. No issues with Leap so far.

Reasonably? Are you kidding?

I’ll give up the Leap and return to the OpenSuse 3.1
But for those want to continue with Leap and autofs, here’s a slightly more direct guidance on autofs
But notice: The Leap has a lot more problems …

Good bye Leap

Automount is a command that allows a device or network volume is automatically mounted file system when the corresponding directory is accessed without the need to directly access the mount command. After a predetermined time interval the system dismantles that directory automatically. This command is useful is to access an variable media device such as a cdrom, or to allow a volume of little-used network is dismantled automatically minimizing traffic in it.

The basic configuration is defined by a file, /etc/auto.master. This file defines generic directories under which the automatic assembly will be made. It can not use automount directly in the root directory,
. So, to organize your file system you could define a generic point to the local machine, misc, and another for network volumes exported by Timbaúva machine. In this case, a auto.master example would be:

Sample auto.master file

For details of the format look at autofs (8).

/misc /etc/auto.misc --timeout 60
/timbauva /etc/auto.timbauva --timeout 60
The format of this sample file is: mount point, map type and options. The mount point must exist a priori. The map type can be a normal file or a network map distributed by the network information system, NIS. If under / misc want to mount cdrom and a floppy disk, we can use the /dev/auto.misc file to indicate this:

This is an automounter map

dos -fstype=vfat,user :/dev/fd0
cdrom -fstype=iso9660,ro :/dev/cdrom
If under / Timbaúva you want to ride home and exported by mail Timbaúva:

This is an automounter map

home -rw,soft,intr timbauva:/home
mail -rw,soft,intr timbauva:/var/spool/mail
So when you type:
$ cd /misc/cdrom
ou $ ls /misc/cdrom

or any command that refers to this directory, it will be mounted. To make things less tedious can make a link:
$ ln -s /misc/cdrom /cdrom

So to access the cdrom would suffice to refer to the directory / cdrom. Of course you could just use a map as misc (this is the default) to do all the automatic assembly.

Finally, to launch, stop, restart or simply check the status of this service use the `` script ‘’

/etc/rc.d/init.d/autofs

with options

start, stop, reload, status.

Here is something easier to read if this is what you are looking for.
https://forums.opensuse.org/showthread.php/429064-How-to-mount-NFS-server-with-autofs

Ok. This is more easy, but I still do not understand why NFS does not work well with Leap and works well with 13.1 and without having to use the autofs.
But no matter, I found other things that do not work in Leap and do not want to try it again. I returned to the 13.1
Thanks for the answer

what works for me with network mounts and usb mounts is to use nofail,auto in the options

for example

dev mount file system options dump/pass

UUID="" /where/it/mounts ntfs-3g (for a wndoze drive) nofail,auto,rw,noexec,etcetra 0 0

192.168.1.100 network mount whatever file system is used nofail,auto,etcetra 0 0

with the nofail it just boots through if the drive is missing and when it shows up or is plugged into the usb it auto mounts.